Matlab Coder and S-Functions
古いコメントを表示
I am trying to convert a Matlab function to an S function via the Matlab coder app. I have sucessfully exported the function through the app, but now I am stuck on how to implement the exported C++ code as an S-Function. Is there a way to do this through the S-Function Builder block and what files from the Matlab coder app would need included there?
Thanks!
3 件のコメント
Arvind
2019 年 3 月 20 日
If you are trying to use the MATLAB Coder generated code within Simulink as a block, there's a much easier approach.
Simply use the MATLAB Function block within Simulink - it generates code (using MATLAB Coder technology under the hood), and automatically creates an compiled s-function that's used within the Simulink model. You don't get access to the S-function - but you probably don't need it, as you already have the code.
You can find more info here:
Elijah Hedrick
2019 年 3 月 21 日
Amal George M
2019 年 3 月 26 日
Please refer to the following documentation on making the signal variable-size:https://in.mathworks.com/help/simulink/ug/declare-variable-size-inputs-and-outputs.html
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Simulink Coder についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!