Editing mask so that subsystem's color changes as per input port value
Show older comments
I would like change the color of my subsystem using the value come in the input port. See screenshot below, the subsystem is CB and the input port reads in a signal called "S1P1". I want CB to change its color as per the value of S1P1. Thanks

3 Comments
Ismael
on 19 Mar 2025
Les Beckham
on 19 Mar 2025
Looks like a clever solution, except I'm wondering why this line
inputVal = evalin('base',srcValue);
isn't just
inputVal = srcValue;
Or just get rid of that line and use srcValue in the following if conditions.
Also, where did you put this code? In one of the model callbacks?
Answers (0)
Categories
Find more on Subsystems in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!