フィルターのクリア

workspace clears and handles are not working after GUIDE use

1 回表示 (過去 30 日間)
Toke
Toke 2014 年 7 月 21 日
回答済み: Toke 2014 年 7 月 22 日
I have this attached matlab code where I use GUIDE.
If I, through my GUI, run either "Run resistivity log" or "Run IP logging" the code works fine. But when the code is done running, all the handles are cleared, and also the handle-function is not working anymore. So I have to close the program and run it again for it to work.
Is there anyway to avoid this? So I can keep my handles and press either buttons several times without having to close the program each time.
I get this error if I try to press one of the buttons after I have run it one time:
??? Error using ==> get Invalid handle
Error in ==> run_logging>run_res_Callback at 94 handles.task_name = get(handles.task_name,'string');
Error in ==> gui_mainfcn at 96 feval(varargin{:});
Error in ==> run_logging at 42 gui_mainfcn(gui_State, varargin{:});
Error in ==> @(hObject,eventdata)run_logging('run_res_Callback',hObject,eventdata,guidata(hObject))
??? Error while evaluating uicontrol Callback

採用された回答

Jan
Jan 2014 年 7 月 21 日
This is a bad idea:
handles.task_name = get(handles.task_name,'string');
On the right side, "handles.task_name" is a handle, on the left side this variable is a string. A second run of this function must fail.

その他の回答 (1 件)

Toke
Toke 2014 年 7 月 22 日
Yep, that was the problem. Thanks

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by