Define default signal values after code generation

2 ビュー (過去 30 日間)
Jonathan Adams
Jonathan Adams 2023 年 12 月 6 日
コメント済み: madhan ravi 2023 年 12 月 6 日
I have a use case where I have bus object inputs to a Simulink model. I'd like to define default initialization values for signals in the structure that persist through Matlab/Simulink Coder such that I can either let the values be a default, or set a value if desired. Has anyone tried this before?

回答 (1 件)

madhan ravi
madhan ravi 2023 年 12 月 6 日
Yes, you can do this by defining your signal as Simulink.Signal. Make sure to set all the properties that you need for your signal.
  1 件のコメント
madhan ravi
madhan ravi 2023 年 12 月 6 日
here is an example for Simulink.Parameter but the same approach can be used for Simulink.Signal

サインインしてコメントする。

カテゴリ

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

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by