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 CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by