How I can save and edit data in a table of GUIDE?

조회 수: 1 (최근 30일)
Alexander
Alexander 2013년 2월 18일
Hi
I'm creating a table in GUIDE, but I have some doubts for save and edit data. I have a table with 3 columns and 30 rows, each columns has a name (name, node, voltage). First I don't know how save information that you enter in table, for then do another action with this data.
Initially the table is empty and I want that you enter any data. In the second and third column only I'm entering numbers, but in the first column can be number o names.
Thank you for any help and excuse me for my irregular english.

채택된 답변

Walter Roberson
Walter Roberson 2013년 2월 18일
After the editing is finished, get() the 'Data' property of the uitable. The result will be a cell array. Save the cell array contents in the form appropriate for your purposes.
  댓글 수: 1
Alexander
Alexander 2013년 2월 20일
Thank you for you help, only needeed to complete with 'data'
a=get(handles.uitable1,'data');
But I have another question, Is possible put a restriction in 'uitable'? Where? Could to restrict per column? Can I use the same code that used in editor, like this
if node<0
warndlg('Numbers of nodes can't be negative','CAUTION');
clear node
else
end

댓글을 달려면 로그인하십시오.

추가 답변 (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