Change the value of a constant block through script

11 ビュー (過去 30 日間)
Bardia Alavi
Bardia Alavi 2019 年 1 月 22 日
回答済み: Bardia Alavi 2019 年 1 月 23 日
How do I set the value of a constant block through set_param script or similar?
I have a constant block and the constant value is a parameter (e.g. input_mult), I want to assign a value of 10 to this in my script.
I try the following command but I receive the error message that input_multiplier is not a parameter of this block:
set_param('speed_monitor_test/Constant', 'input_multiplier', '10');

採用された回答

Bardia Alavi
Bardia Alavi 2019 年 1 月 23 日
I found the answe myself, thank to myself:
set_param('speed_monitor_test/Constant', 'Value', '10');

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProgrammatic Model Editing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by