How to acces to the code of a button

2 ビュー (過去 30 日間)
brahmi ibtissem
brahmi ibtissem 2018 年 3 月 6 日
回答済み: brahmi ibtissem 2018 年 3 月 20 日
Hello, I have an inetrface matlab already functinnelle and I have no problem. Today when I want to change the code of a button or axis I can not. Can you tell me what the problem is. Thanks
  3 件のコメント
Walter Roberson
Walter Roberson 2018 年 3 月 14 日
Somehow you are deleting the figure that the button is attached to.
Image Analyst
Image Analyst 2018 年 3 月 14 日
Search your code for the words "clear" and "delete" and make sure it makes sense, and is needed, to call them when you do. Changes are, you did "clear all" in the function which blew away the essential "handles" structure variable.

サインインしてコメントする。

回答 (3 件)

Steven Lord
Steven Lord 2018 年 3 月 6 日
How did you create the interface: programmatically, using GUIDE, or using App Designer? Check the appropriate section on this documentation page for instruction on how to code your app's behavior. If you have your app open in GUIDE or App Designer, you should be able to edit the callbacks the same way you would add code to a new callback.
If you have opened your UI's code in GUIDE or App Designer and cannot edit the code in those environments, please say a little more about what "I can not" means: do you receive an error (and if so what's the full text, everything in red of that error?), do you receive a warning (ditto, except everything in orange), etc.?

brahmi ibtissem
brahmi ibtissem 2018 年 3 月 14 日
Hi, Despite i verifie "delete" and "clear", i still have the same problem.I have this error message: Error using waitforbuttonpress waitforbuttonpress exit because target figure has been deleted
Error in drawColormap (line 118) k = waitforbuttonpress;
Error in simul>pushbutton10_Callback (line 639) drawColormap(handles);
Error in gui_mainfcn (line 95) feval(varargin{:});
Error in simul (line 42) gui_mainfcn(gui_State, varargin{:});
Error in @(hObject,eventdata)simul('pushbutton10_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating DestroyedObject Callback
  3 件のコメント
brahmi ibtissem
brahmi ibtissem 2018 年 3 月 20 日
編集済み: Stephen23 2018 年 3 月 20 日
Hi, This is the code of the interface and the figure. The problem appear when i click in pushbutton10 (Run simulation).
Walter Roberson
Walter Roberson 2018 年 3 月 20 日
What is the code for drawMap and for drawColormap ?

サインインしてコメントする。


brahmi ibtissem
brahmi ibtissem 2018 年 3 月 20 日
There are the code of drawmap and drawColormap. 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