- 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.
error in default port dimension function of S-function while running in simulink
26 次查看(过去 30 天)
显示 更早的评论
while running the differential equations i am getting the above error
0 个评论
回答(1 个)
Pankhuri Kasliwal
2020-11-25
Hello,
This issue is conceptually similar to an algebraic loop, but instead of occurring for the value of the data, it is occurring for the dimension of the data. As a possible workaround, go into the Port and Data Manager and explicitly set each signal size to their appropriate values. These values will depend on the logic of your model.
Port and Data Manager can be accessed by following the instruction in the following link:
You can also,
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Schedule Model Components 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!