Info

This question is closed. Reopen it to edit or answer.

Simulink - Configuration of model from Matlab

2 views (last 30 days)
JOKY JOKE
JOKY JOKE on 26 Jan 2012
Closed: MATLAB Answer Bot on 20 Aug 2021
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 Comment
Kaustubha Govind
Kaustubha Govind on 26 Jan 2012
Does the same problem occur with using find_system(gcs, 'FollowLinks', 'on', 'LookUnderMasks', 'all', 'tag', 'Development_Tool_Config') also?

Answers (0)

This question is closed.

Community Treasure Hunt

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

Start Hunting!