simulation diagnostics error message

4 ビュー (過去 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 Center および File ExchangeConfigure and View Diagnostics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by