'R = SQRT( XIN $*$ XIN $+$ YIN $*$ YIN )'
'ROUT = R $*$ ( 1 $+$ 0.1 $*$ R $*$ R )'
'THETA = ATAN2( YIN, XIN )',
'XOUT = ROUT $*$ COS( THETA )'
'YOUT = ROUT $*$ SIN( THETA )'
Here, we first calculate three intermediate results (
,
and
) and then use these to calculate the final results (
and
). The MathMap knows that only the final two results
constitute values for the output variables because its Nout attribute
is set to 2. You may define as many intermediate variables in this
way as you choose. Having defined a variable, you may then refer to it
on the right of any subsequent expressions.
Note that when defining the inverse transformation you may only refer
to the output variables
and
. The intermediate variables
,
and
(above) are private to the forward transformation and
may not be referenced by the inverse transformation. The inverse
transformation may, however, define its own private intermediate
variables.
KAPPA --- Kernel Application Package