How to pause a loop of frames using toggle button?
情報
この質問は閉じられています。 編集または回答するには再度開いてください。
古いコメントを表示
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
0 件のコメント
採用された回答
その他の回答 (0 件)
この質問は閉じられています。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!