Matlab Uitable向现有表中添加逻辑列

Matlab Uitable向现有表中添加逻辑列,matlab,user-interface,checkbox,matlab-uitable,Matlab,User Interface,Checkbox,Matlab Uitable,我正在使用UITABLE显示一些数据。显示表之后,我想在表的末尾添加一个逻辑列。并根据选中或未选中的列,采取后续操作。有什么想法吗?举个例子: %# initial table c1 = rand(10,3); h = uitable('Units','normalized', 'Position',[0 0 1 1], 'Data',c1); %# add new column of check boxes c2 = c1(:,1)>0.5; set(h, 'Data',[num2ce

我正在使用UITABLE显示一些数据。显示表之后,我想在表的末尾添加一个逻辑列。并根据选中或未选中的列,采取后续操作。有什么想法吗?

举个例子:

%# initial table
c1 = rand(10,3);
h = uitable('Units','normalized', 'Position',[0 0 1 1], 'Data',c1);

%# add new column of check boxes
c2 = c1(:,1)>0.5;
set(h, 'Data',[num2cell(c1) num2cell(c2)], ...
    'ColumnFormat',[repmat({[]},1,size(c1,2)),'logical'], ...
    'ColumnEditable',[false(1,size(c1,2)),true])

您可能希望处理以执行自定义操作