Removing and Adding Rows to UI Table in GUI

2 ビュー (過去 30 日間)
Chris Dan
Chris Dan 2020 年 7 月 28 日
回答済み: Chris Dan 2020 年 7 月 28 日
Hello,
I am trying to add and remove on my table in the GUI by using the following code:
function AddBoundary_Callback(source,eventdata)
data = get(AssemblyTable5, 'data');
data(end+1,:)={0};
set(AssemblyTable5,'data',data)
end
% This function is not working
function RemoveBoundary_Callback(source,eventdata)
data = get(AssemblyTable5, 'data');
data(end+1,:)={[]};
set(AssemblyTable5,'data',data)
end
The code for adding the rows is working but the code for removing the rows is not
Does anyone know?

採用された回答

Chris Dan
Chris Dan 2020 年 7 月 28 日
I found this answer
function RemoveBoundary_Callback(source,eventdata)
data = get(AssemblyTable5, 'data');
data(end,:) = [];
set(AssemblyTable5,'data',data)
end

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Types についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by