필터 지우기
필터 지우기

How to delete a column conditionally in a UI table?

조회 수: 2 (최근 30일)
Ashish
Ashish 2014년 6월 10일
댓글: Ashish 2014년 6월 10일
I have a UI table made in GUIDE which has 3 columns. The third column is 'Vcal' and need not be displayed and stored, if the equipment type is "Internal Crane" and "Vessel for Replacement".
Can you tell me how should I write this conditional statement deleting the 3rd column from the display ?

채택된 답변

Sara
Sara 2014년 6월 10일
To have an empty table:
set(handles.mytable,'data',cell(nrows,2))
If you already have data in the first two columns that you want to keep while deleting the third col:
mydata = get(handles.mytable,'data');
newdata = mydata(:,1:2);
set(handles.mytable,'data',newdata)
Replace handles.mytable with the handle to your table in the gui.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by