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

2 ビュー (過去 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 Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by