Errors when I close GUI
Mostra commenti meno recenti
I created a togglebutton in GUI and used while get(hObject,'Value') to get into the loop.
While the togglebutton is pressed the loop is running and if I want to close the gui window while the loop is running I get following errors:
??? Error using ==> plot Data must be a single matrix Y or a list of pairs X,Y
Error in ==> Voice_measure_gui>Start_Callback at 115 plot(handles.time_domain,time,data)
Error in ==> gui_mainfcn at 96 feval(varargin{:});
Error in ==> Voice_measure_gui at 42 gui_mainfcn(gui_State, varargin{:});
Error in ==> @(hObject,eventdata)Voice_measure_gui('Start_Callback',hObject,eventdata,guidata(hObject))
??? Error while evaluating uicontrol Callback
The intention of the code is to sample voice speech and to plot its time domain and freq. domain in real time.
Please advice
2 Commenti
Luffy
il 9 Lug 2012
Does delete() help you, if not try to use break
Michael Adelman
il 9 Lug 2012
Risposte (2)
Michael Adelman
il 9 Lug 2012
1 voto
Jan
il 9 Lug 2012
0 voti
So you have to stop the loop, before the figure is closed. The CloseRequestFcn is the best place for code to cleanup.
Categorie
Scopri di più su Programming in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!