I'm trying to use ml
function in Stateflow. because of misunderstanding of my mistake I try example from help: http://www.mathworks.com/help/stateflow/ug/calling-built-in-matlab-functions-and-accessing-workspace-data.html "Which ml Should I Use?" part.
And I get error:
Subscript indices must be of a builtin numeric class. This index has class 'char'.
Transition '[i<5]{...,i,i);}' "'A%d = rand(%d)'"
Debugger thinks that ml
is a variable and try to add it into Model Explorer. It can't understand it correctly!
I read help with attention and only place that makes me lost in thoughts:
Caution Because MATLAB functions are not available in a target environment, do not use the ml namespace operator and the ml function if you plan to build a code generation target.
That's only my assumption, but maybe I'm using code generator that's why I have mistake? By the way I tried to Google about code generator, but can't get clearly opinion what is really it... My assumption again is: simulink build-in MATLAB function uses code generator so and Chart in Stateflow. Maybe I need to use some mex files or smth else to avoid using it?