Error in Using set_param
古いコメントを表示
I've not been able to set the consant in the "constant" block. I used: set_param('dummy/Constant','x',50) but kept getting eroor "Constant block does not have a parameter named 'x'". 'dummy' is the model name.
Thanks.
採用された回答
その他の回答 (1 件)
Brian B
2014 年 7 月 14 日
Try
set_param('dummy/Constant','Value','50')
Note that the value is also a string.
4 件のコメント
William
2014 年 7 月 14 日
Brian B
2014 年 7 月 14 日
Can you post the exact command that you tried? If I run
set_param('untitled/Constant','Value',50)
I get the error you describe. If I replace 50 with '50', I do not get an error.
William
2014 年 7 月 15 日
Fuli Wang
2019 年 12 月 13 日
x=50;
set_param('untitled/Constant','Value',num2str(x));
カテゴリ
ヘルプ センター および File Exchange で Programmatic Model Editing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!