% original way to invert the state of a checkbox: set(checkbox, 'Value', 1 - double(get(checkbox, 'Value') > 0)); % xfigure way checkbox.Value = 1 - double(checkbox.Value > 0);