Can I have more than 1 output argument from a function that I use in the MATLAB Function block in Simulink?
I have a user written function that has multiple input and output arguments. For example:
[a,b,c,d] = my_function(x,y,z)
But when I try to use this in the MATLAB FCN block in Simulink I get the following error:
??? Error using ==> sim Error in MATLAB Function block 'my_model/MATLAB Fcn' while computing the output. The width of the result was 1 when a width of 4 was expected.
I have specified the number of outputs from the block as 4. But only one output from the function is seen.
Best Answer