how can I send data from edit box to a particular cell of uitable in matlab gui

1 回表示 (過去 30 日間)
1. I need to send data from edit box to particular cell in uitable.
2. How can I access a cell in uitable.
Please help me in achieving the desired result with the code.

採用された回答

Walter Roberson
Walter Roberson 2016 年 1 月 22 日
You need to get() the current Data property from the uitable, store the value into the particular cell you want it to go, and then set() the Data property of the uitable to the changed cell array.
If you are using MATLAB up to R2014a then there are also some alternatives if you are willing to use Java. These are undocumented by MATLAB, but you could find them at http://undocumentedmatlab.com . I have no information about whether the methods still work from R2014b onwards. The only supported mechanism is the one I described earlier.
  3 件のコメント
Walter Roberson
Walter Roberson 2016 年 1 月 25 日
data_cell = get(handles.uitable1, 'Data'); %get current table
data_cell{7,19} = 12.34; %put new value in particular place
set(handles.uitable1, 'Data', data_cell); %store modified table
CHETHAN S
CHETHAN S 2016 年 1 月 25 日
Thank you very much.

サインインしてコメントする。

その他の回答 (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