I'm working on a Simulink model containing a MATLAB Fcn block. For example in a function like 'TEST' ,
function z = TEST(x,y)
u = round(x);
v = round(y);
z = u + v;
I have to define input variables of the block at the beginning of the function because this error is occurred:
??? Error due to multiple causes.
Input argument "y" is undefined.
Error evaluating MATLAB function in 'TEST/MATLAB Fcn'
But I can not define "y" because the "x" and "y" are supposed to be defined during the simulation…
How can I send input variables of the MATLAB Fcn block to the function that is written for it?