Simulink ON/OFF switch

Simulink ON/OFF switch. Used to toggle between ON and OFF states.
1.1K Downloads
Updated 7 Dec 2012

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.

Cite As

Glenn Gomes (2024). Simulink ON/OFF switch (https://www.mathworks.com/matlabcentral/fileexchange/39348-simulink-on-off-switch), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2012b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Modeling in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.2.0.0

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

1.0.0.0