I have created a set of gui's and i have inserted next button to navigate to the next gui. in the next gui i have a load button and an axes to display the image but if i select an image it gives me an error. the error is displayed below.

조회 수: 1 (최근 30일)
Attempt to reference field of non-structure array.
Error in LBPFeature>pushbutton1_Callback (line 84) axes(handles.axes1)
Error in gui_mainfcn (line 96) feval(varargin{:});
Error in LBPFeature (line 42) gui_mainfcn(gui_State, varargin{:});
Error in @(hObject,eventdata)LBPFeature('pushbutton1_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating uicontrol Callback
What can i do to display the image? if i open each gui individually i can load the image but if i navigate im not able to load the image. Please help me
  댓글 수: 1
Jeevan
Jeevan 2014년 5월 6일
[filename pathname]=uigetfile({'*.bmp';'*.jpg'},'File Selector'); image=strcat( pathname, filename) axes(handles.axes1) imshow(image)
This is the code used to load an image.. and the error is in "axes(handles.axes1)" how can i fix this error?

댓글을 달려면 로그인하십시오.

채택된 답변

nl2605
nl2605 2014년 5월 6일
It doesn't know what handles.axes1 is. First use h = findobj('Tag',axes1) and then axes(h). I think it should work.
  댓글 수: 25
nl2605
nl2605 2014년 5월 8일
I searched for it. It won't be possible to do it in the Callback function of your edit text. YOu can do it in another Keypressfcn. But I still am not sure if 'Color' would work with set. Sorry, couldn't be of more help. Post it in another thread. Maybe someone will know the answer.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by