Error: output is inferred as a variable-size matrix, but its size is specified as inherited or fixed.
To simplify the question, when I define the size of my output based on a constant input (it won’t change during the simulation), i receive the following error: ‘y’ is inferred as a variable-size matrix, but its size is specified as inherited or fixed. Verify ‘y’ is defined in terms of non-tunable parameters, or select the ‘Variable Size’ check box and specify the upper bounds in the Size box.
Other people had this problem but I couldn’t really find a way to fix it. I can’t select the variable size check box because it lead to other errors. I also don’t have the coder library. I got that in theory this constant value can me modified and then cause problems, but it isn’t my case, I just want to define it when the simulation starts.
function y = fcn(u)
y = zeros(u,1);To simplify the question, when I define the size of my output based on a constant input (it won’t change during the simulation), i receive the following error: ‘y’ is inferred as a variable-size matrix, but its size is specified as inherited or fixed. Verify ‘y’ is defined in terms of non-tunable parameters, or select the ‘Variable Size’ check box and specify the upper bounds in the Size box.
Other people had this problem but I couldn’t really find a way to fix it. I can’t select the variable size check box because it lead to other errors. I also don’t have the coder library. I got that in theory this constant value can me modified and then cause problems, but it isn’t my case, I just want to define it when the simulation starts.
function y = fcn(u)
y = zeros(u,1); To simplify the question, when I define the size of my output based on a constant input (it won’t change during the simulation), i receive the following error: ‘y’ is inferred as a variable-size matrix, but its size is specified as inherited or fixed. Verify ‘y’ is defined in terms of non-tunable parameters, or select the ‘Variable Size’ check box and specify the upper bounds in the Size box.
Other people had this problem but I couldn’t really find a way to fix it. I can’t select the variable size check box because it lead to other errors. I also don’t have the coder library. I got that in theory this constant value can me modified and then cause problems, but it isn’t my case, I just want to define it when the simulation starts.
function y = fcn(u)
y = zeros(u,1); error, simulink, variables, matlab function MATLAB Answers — New Questions