How do you create a push button that saves data from a GUI?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
deenessen armoogum
am 1 Jun. 2019
Kommentiert: deenessen armoogum
am 5 Jun. 2019
How to do it?
0 Kommentare
Akzeptierte Antwort
Geoff Hayes
am 2 Jun. 2019
Bearbeitet: Geoff Hayes
am 2 Jun. 2019
deenessen - you haven't given us much to work on, but presumably your GUI has a button that, when pushed, you want to save some data to an Excel file. Assuming that GUIDE is being used, then your pushbutton callback would look like
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% get and format your data
myData = randi(42, 10,3);
% write your data to file
writematrix('myFile.xlsx', myData);
10 Kommentare
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Spreadsheets finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!