File Exchange

image thumbnail

Simulink ON/OFF switch

version 1.2 (9.09 KB) by

Simulink ON/OFF switch. Used to toggle between ON and OFF states.



View License

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.

Comments and Ratings (2)


Erik (view profile)



Uses gcb instead of explicitly referring to block name, which makes reuse difficult.

MATLAB Release
MATLAB 8.0 (R2012b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Win prizes and improve your MATLAB skills

Play today