Suppose I have a Simulink block that contains something like:
function y = myFnc(x, par)
y = zeros(1, par(1)) + x;
I declare par
as a Parameter in the model explorer and read its value from the workspace.
Now, Simulink infers that y
is a variable-size signal with all the pretty nasty limitations associated with it.
Is there any way to parametrize signals dimensions from the workspace, yet leaving the signals fixed-size somehow?
In C/C++ I'd just declare a constant.