uitable with logical cell (checkbox)
조회 수: 7 (최근 30일)
이전 댓글 표시
Hi,
How can I know which rows in a uitable with logical cell (checkbox) were selected (upon clicking a button)?
Thanks.
댓글 수: 0
채택된 답변
Walter Roberson
2013년 12월 10일
get() the Data property of the table and examine the respective cells.
댓글 수: 6
Walter Roberson
2013년 12월 11일
foo = uitable('Data', {false;true;true;false;false}, 'ColumnEdit', true);
Now click on the last entry. Then
data = get(foo, 'Data');
logical_vec = horzcat(data{:});
find(logical_vec)
You should now see that 1 and 4 are not in the list.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!