what happened to the folowing code?

조회 수: 3 (최근 30일)
romasha
romasha 2014년 2월 2일
댓글: Jan 2014년 2월 3일
hi,
im launching this code but images slideshow is not working its show only last image
code
function fgui2_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to fgui2 (see VARARGIN)
% Choose default command line output for fgui2
handles.output = hObject;
imgNameList = {'images.jpg','images (1).jpg','images (2).jpg','download.jpg','images (4).jpg','images (5).jpg','images (6).jpg','images (7).jpg','eye3.jpg'};
subplot(2,2,4);
pause on;
for i = 1:length(imgNameList)
a = imread(imgNameList{i});
imshow(a);
drawnow;
pause(3);
end
% Update handles structure
guidata(hObject, handles);
  댓글 수: 3
romasha
romasha 2014년 2월 2일
these 8 images did not show and yes i wait for some second for output and then on gui fig 9th images is displayed only
Jan
Jan 2014년 2월 3일
What about using the debugger: Set a breakpoint in the imshow() line and check what happens in detail.

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

답변 (1개)

Walter Roberson
Walter Roberson 2014년 2월 2일
I suggest you parent all the objects, as I describe in http://www.mathworks.co.uk/matlabcentral/answers/22208-show-figure

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by