- Open the MATLAB Function Block which reported the error and select Edit Data on the Editor tab. Alternatively select the block in the Model Explorer (CTRL+H).
- Select each variable corresponding to Input and Output ports, and in the Size edit box, specify the correct dimensions. The default is -1 or 'inherited', meaning automatically determined.
- Steps 1 and 2 may need to be repeated for other MATLAB Function Blocks in the model if they subsequently generate similar errors now.
Why does not this function fully set the dimensions of output port while simulating?
조회 수: 3 (최근 30일)
이전 댓글 표시
Hi everybody
I've been trying to simulated a planar five-bar parallel robot. The dynamic equations have been derived, modified and simplified by reduced model method.
The equations and inputs seems resonable, and I double checked the parameters and anything possible. but while simulating it, there is an annoying error below:
Error in default port dimensions function of S-function 'Dynamics_new_approach/MATLAB Function'. This function does not fully set the dimensions of output port 2
I'll apreciate it if anyone could help me with fixing this error.
댓글 수: 0
답변 (1개)
Saurabh
2024년 9월 9일
Hi Ramin,
It appears to be a MATLAB dimension mismatch, as the error indicates. I am providing a workaround here since I do not have access to the model:
See the following link for further information on the cause of this error:
I hope this was helpful
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Block Libraries에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!