How do I trace the signals in subsystems that come directly from the root level inports in Simulink 7.4 (R2009b)?

1 view (last 30 days)
I have a model that has multiple subsystems. The subsystem may also have child subsystems. I want to find the signals in all the subsystems that are coming directly from the root-level inports. I want to highlight the blocks and signal with a color of my choosing.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 7 Apr 2010
There is no single command in MATLAB that can perform this task. However, we can achieve this using combination of commands such as 'find_system' and 'get_param'. The properties of blocks that are useful in this case are 'PortConnectivity', 'Handles', 'Parent' and 'BlockType'. See the attached function for an example code that accomplishes this task on the attached test model. Run the attached MATLAB script as follows:
change_colors_recursive(test_model, 'red')

More Answers (0)

Categories

Find more on Schedule Model Components in Help Center and File Exchange

Products


Release

R2009b

Community Treasure Hunt

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

Start Hunting!