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