필터 지우기
필터 지우기

What's a Simulink.Parameter?

조회 수: 26 (최근 30일)
Matteo Manzini
Matteo Manzini 2020년 6월 16일
답변: Fangjun Jiang 2020년 6월 16일
I'm wondering which is the difference in creating a Matlab Variable and use it in a Simulink Model and creating a Simulink.Parameter.
I mean, they both get saved in the Base Workspace so is it just a matter of convenience to use Simulink.Parameter?
Thanks in advance!

채택된 답변

Fangjun Jiang
Fangjun Jiang 2020년 6월 16일
Actually it takes more work (or lines of code) to define a Simulink.Parameter. But it has more capabilities.
It can define Min and Max value. It can give warning when Value is out of bound.
It can specify Unit, potentinoally do unit consistency check.
Most importantly, it can specify "storage class". It is used for code generation which allow you to specify how code is generated, e.g. imported, exported, global, define, etc.
Simulink.Signal is similar.
Not all capabilities have been available, especially in earlier version of MATLAB.
a=Simulink.Parameter
open a

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Interactive Model Editing에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by