simulation diagnostics error message

2 次查看(过去 30 天)
mahmoud
mahmoud 2012-5-30
i tried to simulate a model and i used a user-defined function:" Matlab Function".
there is 2 inputs to this function. the two inputs are combined using mux.
when i start the simulation ,i get the following message :
"Evaluation of expression resulted in an invalid output. Only finite double vector or matrix outputs are supported."
and the simulation stop.
the function which i used is:
evalfis([u(1) u(2)],fismatrix);
note: i have wrote the following code in model properties callback function InitFcn:
fismatrix=readfis('flc.fis');
please , i want to know what is the problem, and how to solve this problem.
thanks for attention.

回答(1 个)

Walter Roberson
Walter Roberson 2012-5-30
Your user-definded returned something that was not double precision, or it was infinite, or it was NaN. (Or possibly it was more than 2 dimensions, but I am not sure that is an error.)
Do you do anything with the result of evalfis() or do you just discard it like you show in your Question? If you just discard it, then perhaps the output you return from the user-defined function is something invalid.

类别

Help CenterFile Exchange 中查找有关 Configure and View Diagnostics 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by