Simulink S-Function Output Ports
古いコメントを表示
I'm having issues with a Simulink S-Function I've written, and keep getting the error message:
"Error in default port dimensions function of S-function 'LQR_Initial_System/LQR Implementation'. This function does not fully set the dimensions of output port 2"
Unfortunately, the S Function in question only has a single output port. The Simulink model explorer only recognises a single output port, as the pic "Model Ports.jpg" shows.
Could anyone offer any help please?
Thanks
4 件のコメント
Fangjun Jiang
2018 年 12 月 3 日
You have to show the S-function source code to debug the problem.
Crispin Zuercher
2018 年 12 月 3 日
Liping
2018 年 12 月 19 日
Can you help me to solve the same problem?
Error in default port dimensions function of S-function 'fangzhen22/Embedded MATLAB Function'. This function does not fully set the dimensions of output port 2
![`]8JTX`TN$%ISGH(8)R4]15.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/199378/`]8JTX`TN$%ISGH(8)R4]15.jpeg)
Fangjun Jiang
2018 年 12 月 19 日
Look at the .jpg file in the original question, find the similar place for your Embedded MATLAB Function block, change the "size" of "FS" from -1 to something else, likely 1 if your FS is a scalar.
回答 (1 件)
Fangjun Jiang
2018 年 12 月 3 日
0 投票
This is not a Simulink S-function. It is a MATLAB Function block.
Anyway, as you've shown in your attached image, just explicitly specify the "size" for "F1". For example, it seems that the size of "F1" can be set as 1.
カテゴリ
ヘルプ センター および File Exchange で String についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!