Code covered by the BSD License
06 Dec 2012
07 Dec 2012)
Simulink ON/OFF switch.
Used to toggle between ON and OFF states.
Watch this File
Subsystem alternates between ON and OFF and changes colors and labels accordingly.
The output is 0 and color is blue when OFF
The output is 1 and color is red when ON.
Code is contained in the OpenFcn callback and can be changed as needed.
Uses gcb instead of explicitly referring to block name, which makes reuse difficult.