How to pause a loop of frames using toggle button?
Infos
Cette question est clôturée. Rouvrir pour modifier ou répondre.
Afficher commentaires plus anciens
Hi, I have a problem with a toggle button. I want to display a loop of frames and pause it with toggle button. Displaying and pausing it is okay, but when I press a toggle button again, it shows a loop again from the start and not from the spot where it was paused.
This is my code:
button_state = get(hObject,'Value');
if button_state == 1; start = 1; while start <= nFrames
ih = image(loading(:,:,start));
colormap(gray(256));
drawnow;
pause(0);
start = start + 1;
end
elseif button_state == 0;
pause
end
Réponse acceptée
Plus de réponses (0)
Cette question est clôturée.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!