simulink & Matlab-Fcn :undefined input argument error
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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.
Caused by:
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?
Thank you.
0 comentarios
Respuestas (1)
Kaustubha Govind
el 18 de Jun. de 2012
Does the MATLAB Fcn block show up with two input ports on the Simulink model? I suspect that you may have unwittingly configured "y" as a parameter. To verify this, double-click on the block to open the Editor window, select Tools>Edit Data/Ports. Then select "y" on the left pane and ensure that "Scope" is set to "Input".
0 comentarios
Ver también
Categorías
Más información sobre String en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!