Info

此问题已关闭。 请重新打开它进行编辑或回答。

Simulink - Configuration of model from Matlab

1 次查看(过去 30 天)
JOKY JOKE
JOKY JOKE 2012-1-26
关闭: MATLAB Answer Bot 2021-8-20
Hi,
I open my simulink model from Matlab simlpy by writing model in the command line. Then I would like to configure subsystems within the model by:
h_development = find_system(gcs, 'FollowLinks', 'on', 'tag', 'Development_Tool_Config');
if switch_development_tool subsystem = 'Development_Tool'; else subsystem = 'Development_Tool_Dummy'; end
set_param(char(h_development),'BlockChoice', subsystem)
I do this for many subsystems. For some, it works and for some it does not work. When it does not work, find_system does not deliver a handle. If I run or initialize the model once, it works fine. However, I can not do this automatically, since MATLAB displays an error, because certain variables are missing, depending on the subsystemes that I want to choose.
My question is, if there is a solution, so I can get the handels right before initializing or running the system or if I can initialize the system from Matlab and skip the error automatically.
Thank you
  1 个评论
Kaustubha Govind
Kaustubha Govind 2012-1-26
Does the same problem occur with using find_system(gcs, 'FollowLinks', 'on', 'LookUnderMasks', 'all', 'tag', 'Development_Tool_Config') also?

回答(0 个)

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by