S function execution based on Simulation and RTW build

5 ビュー (過去 30 日間)
Anand Rangaramu
Anand Rangaramu 2013 年 6 月 12 日
I have a requirement to execute portion of S function based on if S function is invoked by Simulation or by RTW build.
I tried to use flags like MATLAB_MEX_FILE and MDL_RTW. But I couldn't make it working.
Any pointers how to differentiate these two situations?
Thanks.

採用された回答

Kaustubha Govind
Kaustubha Govind 2013 年 6 月 12 日
Typically this is achieved by creating a TLC file for the S-function (see Inlining S-functions). The TLC implementation is used for code-generation, and the code in the MEX-file is used for simulation.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink Coder についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by