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 Functions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!