https://www.mathworks.com/help/matlab/ref/matlab.ui.control.toggleswitch.html
ToggleSwitch - Toggle switch UI component - MATLAB
A toggle switch UI component indicates a logical state and updates its state when an app user interacts with it.
toggle switchtoggleswitchuicomponentmatlab