Referencing 1) Simulink Model Components In Subsystems and 2) Workspace variables
情報
この質問は閉じられています。 編集または回答するには再度開いてください。
古いコメントを表示
I need to access / change simulink model component parameters (such as gain values) when using subsystems. I can access the root level of the simulink model with "set_param([bdroot '/GainBlock1'],'Gain',str)" but how would i do the same in a subsystem. The other question I have is very similar. I would also like to change workspace variables using similar method, but again I cant get it to work. Your help really appreciated Kind regards, Ian
0 件のコメント
回答 (1 件)
Sebastian Castro
2015 年 7 月 29 日
For your first question, you should be able to the following without any issues:
>> set_param([bdroot '/Subsys/Subsubsys/BlockName'])
For your second question, what type of workspace variables are you concerned about? I'm guessing it's not the MATLAB base workspace, because those you can change directly in the Command Window:
>> x = 2;
Are you perhaps also working with model references and model workspaces?
- Sebastian
1 件のコメント
この質問は閉じられています。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!