How can I set I checkbox to true in a MATLAB gui?
matlab, user-interface
Solution
You can also set it in the opening function (or on another callback) by inserting the following line:
set(handles.checkbox1,'Value',1);
or replace 'checkbox1' with whatever tag you have assigned to your checkbox. To uncheck, simply set the value to zero. This way, if you have two mutually exclusive options, when you select one you can automatically deselect the other:
Problem
I need a checkbox to be checked by default on creation of the gui. How can this be done in MATLAB? I looked through the uicontrol inspector without any luck.