MATLAB: Won’t the checkboxes uncheck in UITABLE

MATLAB

I can check a checkbox in UITABLE but when I click on it to uncheck, it remains checked. I create the UITABLE using:
uitable('data',repmat({'true'},10,1),...
'columnformat',{'logical'},...
'columneditable',true);

Best Answer

The reason the check boxes are not unclicking correctly is because their values are set to strings ‘true’ and ‘false’ rather than logical true and false. Here is an example that fixes it:
uitable('data',true(10,1),...
'columnformat',{'logical'},...
'columneditable',true)