I have made a gui which opens another gui & after inserting values in the edit text of 2nd gui when i press the push button to run a program it shows errors like'

?? Attempt to reference field of non-structure array.
Error in ==> gui3>pushbutton1_Callback at 81 Q=str2double(get(handles.edit1,'string'))
Error in ==> gui_mainfcn at 96 feval(varargin{:});
Error in ==> gui3 at 42 gui_mainfcn(gui_State, varargin{:});
Error in ==> @(hObject,eventdata)gui3('pushbutton1_Callback',hObject,eventdata,guidata(hObject))
??? Error while evaluating uicontrol Callback

 Accepted Answer

If you attempt to open a second GUI by using openfig(), then the initialization code associated with the second GUI is not run, so it will not have a proper "handles" structure. To open a second GUI you should start its .m file.

More Answers (0)

Categories

Find more on Printing and Saving in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!