To clearify my problem I've used GUIDE to make a simple GUI. I've made two pushbuttons. One to save data using uisave , and one to load data using uiopen. I save the handle variables in a file with the first button. But when I open this file with the second button, it will open my GUI two times!! The code looks like this:
% --- Executes on button press in pushbutton1.
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)
uisave('handles');% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)uiopen();
I would really like to open my GUI only one time if I open a file. Or that it just loads the data into the already opened GUI. Looks like I'm doing something very stupid here… (when i just use uisave(); I have the same problem.
Geert
Best Answer