フィルターのクリア

How to change the parameter value of multiple (same) modules in Simulink?

1 回表示 (過去 30 日間)
Anh Tran
Anh Tran 2018 年 8 月 23 日
コメント済み: Fangjun Jiang 2018 年 8 月 23 日
I have more than a hundred of same battery modules on a project. Now I want to change the spec of all the battery.
Is there an easy way to do this other than to delete and redo everything again.

回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2018 年 8 月 23 日
Usually, write a script to do it in a batch, using the following functions.
find_system()
get_param()
set_param()
  2 件のコメント
Anh Tran
Anh Tran 2018 年 8 月 23 日
Can you give me a specific example (or a link to a tutorial) to do this? I'm quite new to Simulink.
Fangjun Jiang
Fangjun Jiang 2018 年 8 月 23 日
f14;
GainBlocks=find_system('f14','BlockType','Gain');
for k=1:numel(GainBlocks)
set_param(GainBlocks{k},'BackgroundColor','red');
end
web(fullfile(docroot, 'simulink/ug/approach-modeling-programmatically.html#butuhsj-1'))

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

カテゴリ

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

タグ

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by