Error in default port dimensions function of S-function
显示 更早的评论
Hii,
I am trying to simulate a model predictive control based drive system. While simulating the model, I am getting the following Error.
Caused by:
- Error in default port dimensions function of S-function 'MPC_Inv_IM_R1/Predictive Controller'. This function does not fully set the dimensions of output port 2
I have attached the simulink model and error file.
I need help in this regard. Thanks in advance.
With regards,
Manikandan Raju

回答(1 个)
Shadaab Siddiqie
2021-8-30
0 个投票
You can follow one of these workarounds to fix this issue.
- Please set the size on all ports for which the error is reported (don't forget to subtract one from the reported numbers!).
- Sometimes, Shortening the model file name fixed this issue in at least one case. (The name had been over 68 characters.) Error might possibly be something to do with the filename being too long, so MATLAB was reading the first so many characters and getting multiple files that differ in name only after the cutoff confused.
类别
在 帮助中心 和 File Exchange 中查找有关 General Applications 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!