Create a "Copy-Button" in MATLAB GUI
4 ビュー (過去 30 日間)
古いコメントを表示
Hi,
i created a Matlab GUI and I need to add a button to copy the data that is presented in the uitable.
I need to create a matrix that contains als the three-dimensional ponits. So it needs to look like the uitable that in the attached fig-file, but the columns are seperated by comma.
I hope that somebody knows what I am looking for.
Thnaks in advance.
0 件のコメント
回答 (1 件)
Voss
2023 年 2 月 14 日
(I modified your m-file to include pushbutton_Callback and pushbutton2_Callback in the handles structure so I could run those functions here in the Answers forum.)
h = bachelor;
handles = guidata(h);
handles.pushbutton_Callback(handles.figure1,[],handles) % same as clicking the "Calculate" button
I added a single line to pushbutton2_Callback, which is "get(handles.table1,'Data')", so that when the "Copy Data" button is pushed the contents of the uitable are displayed in the command window.
handles.pushbutton2_Callback(handles.figure1,[],handles) % same as clicking the "Copy Data" button
It sounds like that's the matrix you want to create.
Do you want to do something else with it?
3 件のコメント
参考
カテゴリ
Help Center および File Exchange で Environment and Settings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!