Elie Issa
2006-05-14 23:00:49 UTC
Hello there,
I need to turn some matlab(.m) files into blocks in Simulink. I found
one solution(don't know if there's better) which is not working
properly; it consists of using Embedded Matlab Function Blocks.
Once this block is created and the code(.m) is transfered to the
embedded editor,i simulate the model(.mdl) but i get several errors:
-Undefined function or variable 'xyz'.
The first assignment to a local variable determines its class.
Inputs, outputs, and parameters inherit their class from the model
explorer.
-In an expression of the form start:stride:end, Embedded MATLAB only
supports constant strides.
PS: when simulating the m files in Matlab, none of these errors
appear.
I'd like to know if there's a better way to use m files in Simulink
or else what can i do to prevent these errors.
Thank you.
I need to turn some matlab(.m) files into blocks in Simulink. I found
one solution(don't know if there's better) which is not working
properly; it consists of using Embedded Matlab Function Blocks.
Once this block is created and the code(.m) is transfered to the
embedded editor,i simulate the model(.mdl) but i get several errors:
-Undefined function or variable 'xyz'.
The first assignment to a local variable determines its class.
Inputs, outputs, and parameters inherit their class from the model
explorer.
-In an expression of the form start:stride:end, Embedded MATLAB only
supports constant strides.
PS: when simulating the m files in Matlab, none of these errors
appear.
I'd like to know if there's a better way to use m files in Simulink
or else what can i do to prevent these errors.
Thank you.