- 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 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Saurabh
el 9 de Sept. de 2024
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 comentarios
Ver también
Categorías
Más información sobre Block Libraries en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!