simulation diagnostics error message

4 views (last 30 days)
mahmoud
mahmoud on 30 May 2012
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.

Answers (1)

Walter Roberson
Walter Roberson on 30 May 2012
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.

Categories

Find more on Configure and View Diagnostics in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!