I am using matlab function block inside model simulink, when I run model fcn gives this error message,
古いコメントを表示
Expected either a logical, char, int, fi, single, or double. Found a MATLAB type. MATLAB types are returned from calls to the MATLAB interpreter and are not supported inside expressions. They may only be used on the right-hand side of assignments and as arguments to MATLAB calls.
Function 'MATLAB Function' (#295.250.252), line 9, column 4:
1 件のコメント
Azzi Abdelmalek
2013 年 2 月 7 日
What is in your function?
回答 (1 件)
Kaustubha Govind
2013 年 2 月 7 日
0 投票
You need to pre-declare the size/type of the variable which is supposed to be calculated by an extrinsic function (an extrinsic function is a function that is not in the list of Functions Supported for Code Generation). Please see Converting mxArrays to Known Types.
1 件のコメント
Prateek Tiwari
2020 年 6 月 30 日
@Kaustubha
What if I do not know the size before hand?
カテゴリ
ヘルプ センター および File Exchange で Simulink についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!