How to save information in my GUI and resume the function

4 visualizzazioni (ultimi 30 giorni)
Hello!
So I have a GUI where it displays words of a sentence that is sourced from a list I have created, and the user is able to hit the toggle boxes and "score" the sentence where the data is save in a cell. However, I want to add a save feature since there are alot of sentences the user is scoring and I want them to have the ability to exit matlab and resume scoring where they left off the next day. Currently, my code below is what I am using to create a save file.
% --- Executes on button press in Save_button.
function Save_button_Callback(hObject, eventdata, handles)
% hObject handle to Save_button (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global ID
C=date;
filename=strcat('Savefile_main',C)
path=fullfile('Data',ID,filename)% change to ID
savefig(path)
close all
However, there is an issue. If the user hits the save button and opens the savefile, they are able to resume where they left off (which is what I want), but if the user exits out of MATLAB and opens the save file; I get an error in the screenshot.
Any pointers to help me out? Let me know if more information is necessary to understand the problem. Thanks!

Risposte (0)

Categorie

Scopri di più su Language Fundamentals in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by