How to display the value of a variable used in a Constant (Simulink) block under it?

14 ビュー (過去 30 日間)
Laurentiu
Laurentiu 2014 年 9 月 1 日
コメント済み: Laurentiu 2014 年 9 月 1 日
Hello,
I have in the Matlab workspace a variable named 'c_veh_speed_lim_kph' with the value of 120. In Simulink I use the same variable in a Constant block.
How can I display in the Simulink model the value of the variable under the block name? This I want to do it automatically. If for example I change the value in the workspace to 130 I want to see the same value displayed under the Constant block.
Thank you.
Best regards,
Laurentiu

回答 (1 件)

Rick Rosson
Rick Rosson 2014 年 9 月 1 日
Please review the following:
The Block Annotations tab will allow you to display the value of the constant.
  1 件のコメント
Laurentiu
Laurentiu 2014 年 9 月 1 日
Hello,
The Block Annotations tab will display the name of the variable, not the value itself. Basically I need to evaluate the variable name and display the result but I didn't figure it out so far...
Regards,
Laurentiu

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

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by