Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

need help in the next call back function

조회 수: 4 (최근 30일)
Francis Li
Francis Li 2015년 9월 23일
마감: MATLAB Answer Bot 2021년 8월 20일
I am currently working on the next push button call back function. what I want is to press the next button and it shows a picture and I press it again it shows another picture.
I know how to make a call back function for "one button for one picture". But I do not know how to deal with next push button call back function. Thanks in advance
Here is my code
if true
% code
end
btn_type=uicontrol(fig,...
'Style','push','units','normalized',...
'Position',[0.01 0.32 0.08 0.04],...
'Tooltip','Run',...
'String','before',...
'Callback',[...
'']);
btn_type=uicontrol(fig,...
'Style','push','units','normalized',...
'Position',[0.2 0.32 0.08 0.04],...
'Tooltip','Run',...
'String','next',...
'Callback',[...
'']);

답변 (1개)

Subhra Saha
Subhra Saha 2015년 10월 1일
You can read the images into an array and then keep an index variable to loop over the images and then display them.
Below is a link describing the same:

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by