Elliot
2011-07-18 18:22:15 UTC
Hey all,
I'm trying to convert a .m file into something usable by a user defined function block in simulink but am having trouble with the following style of equation:
x = exp([-y:y]);
where y is an integer which normally has a value between 40 and 120.
Running this through simulink results in the following error:
------------------------------------------------
Computed maximum size of the output of function 'colon' is not bounded.
Static memory allocation requires all sizes to be bounded.
The computed size is [1 x :?].
Function 'testing.m' line 8, column 14:
"[-y:y]"
----------------------------------------------------
I know simulink doesn't like variably sized arrays/matrices but I'm not sure I can set an upper bound in this case since it's referring to the operation itself rather than x or y.
Anyone know of a potential work around for this?
Cheers.
I'm trying to convert a .m file into something usable by a user defined function block in simulink but am having trouble with the following style of equation:
x = exp([-y:y]);
where y is an integer which normally has a value between 40 and 120.
Running this through simulink results in the following error:
------------------------------------------------
Computed maximum size of the output of function 'colon' is not bounded.
Static memory allocation requires all sizes to be bounded.
The computed size is [1 x :?].
Function 'testing.m' line 8, column 14:
"[-y:y]"
----------------------------------------------------
I know simulink doesn't like variably sized arrays/matrices but I'm not sure I can set an upper bound in this case since it's referring to the operation itself rather than x or y.
Anyone know of a potential work around for this?
Cheers.