What is the advantage of defining a variable as workspace object?

Hello,
What is the advantage of defining a variable as workspace object using simulink.parameter over directly defining a variable (as x = 2)?
Any article or documentation for same will be highly helpful.
Thanks.

回答 (1 件)

Kaustubha Govind
Kaustubha Govind 2013 年 10 月 4 日

0 投票

Using just a regular variable allows you to define a value for a parameter. However, using a Simulink.Parameter object allows you to specify a lot of other information (see the previous link), like "the parameter's purpose, its dimensions, or its minimum and maximum values". There are additional fields like 'Storage class' and 'Alignment' which are used to achieve advanced features in code generation.

1 件のコメント

ANKIT
ANKIT 2013 年 10 月 5 日
Hello Kaustubha, Thanks for your answer. I want to learn more about these advance features in code generation. If you can suggest some good examples or documentation for the same.

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

カテゴリ

ヘルプ センター および File ExchangeDeployment, Integration, and Supported Hardware についてさらに検索

タグ

質問済み:

2013 年 10 月 4 日

コメント済み:

2013 年 10 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by