Why does not this function fully set the dimensions of output port while simulating?

조회 수: 1 (최근 30일)
Ramin
Ramin 2018년 12월 29일
답변: Saurabh 2024년 9월 9일
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.

답변 (1개)

Saurabh
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:
  1. 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).
  2. 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.
  3. Steps 1 and 2 may need to be repeated for other MATLAB Function Blocks in the model if they subsequently generate similar errors now.
See the following link for further information on the cause of this error:
I hope this was helpful

카테고리

Help CenterFile Exchange에서 Block Libraries에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by