フィルターのクリア

Is it possible to add a new colulmn to an already predefined uitable in Matlab GUide?

2 ビュー (過去 30 日間)
sachin narain
sachin narain 2018 年 5 月 2 日
コメント済み: sachin narain 2018 年 5 月 3 日
I have a Uitable made with predefined columns and datas in matlab Guide .I want as soon as i choose a value(or a cell) in a column ,a new column should be added in the uitable and show its values.Should i code this in the cellSelectioncallBack function .If yes how do i do this.Any example will be appreciated?
Thank you for your help

回答 (1 件)

Jan
Jan 2018 年 5 月 2 日
編集済み: Jan 2018 年 5 月 2 日
Yes, the CellSelectionCallback sounds fine, if you want to apply the operation, when a cell is selected:
function YourCellSelectioncallBack(Source, Event)
Data = get(Source, 'Data');
Data = cat(2, Data, num2cell([2;3;4]));
set(Source, 'Data', Data);
end
This appends the values 2,3,4 as a new column. I do not know, what "show its values" mean, but this is an example only.
  1 件のコメント
sachin narain
sachin narain 2018 年 5 月 3 日
But say i want to append a value '2' as a column data.The column where i want to put this data is in the 4th column of the uitable. How do i concatinate it now

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

カテゴリ

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