Stateflow | ![]() ![]() |
The ml() Function Versus ml Name Space Operator
It is recommended to use the ml
name space operator wherever possible. The ml
name space operator is faster and more robust than the ml()
function. If you need to work with MATLAB matrices instead of scalars, then use the ml()
function.
In this example, the ml()
function must be used to specify an array argument.
a = ml('my_function([1:4],%g)',d1);
x
is a MATLAB workspace matrix. my_function
is a MATLAB function that expects a vector as its first argument and a scalar as a second argument.
![]() | MATLAB Name Space Operator | Data and Event Arguments | ![]() |