Create a "Copy-Button" in MATLAB GUI
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Voss
el 14 de Feb. de 2023
(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 comentarios
Ver también
Categorías
Más información sobre Environment and Settings en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!