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

1 view (last 30 days)
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.

Accepted Answer

Walter Roberson
Walter Roberson on 18 Feb 2013
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 Comment
Alexander
Alexander on 20 Feb 2013
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

Sign in to comment.

More Answers (0)

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!