Evaluate a Matlab expression within a scope.
The expression argument is of the form
matlab("expression", arg1, arg2, ...), where
arg1, arg2, ... is a list of Variables appearing in
"expression". Note that this form of invoking matlab
is limited to returning only the first return value of a
matlab function. If you need multiple return values, use the
matlab actor.
Note that having an instance of Expression
in the model will keep the matlab
engine open from model preinitialize() to wrapup() and hence
opening/closing of additional Engine instances done by this
matlab expression evaluator becomes fast. Most users should
prefer to use Expression
and resort to
this mechanism of invoking matlab only where necessary, e.g. in
FSM transition action expressions (which was the reason for
introducing this form of matlab engine access).
If a "packageDirectories" Parameter is in the scope of this
expression, its value is added to the matlab path while the
expression is being executed (like Expression
).