How to pause a loop of frames using toggle button?
Información
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (0)
La pregunta está cerrada.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!