How should I code for the max value of a slider?

조회 수: 3 (최근 30일)
anahita
anahita 2013년 7월 8일
In the GUI that I've created, at the first the user should load a video and after that he should be able to visualize any frame of this video. I want to put a slider that it's max should be the number of the frame of the loaded data, but I don't know how can I code for the max value(to be adapted with the number of the frame each time a file is loaded)...

채택된 답변

David Sanchez
David Sanchez 2013년 7월 8일
If N_frames is the number of frames:
set(handles.your_slider,'Max',N_frames);
set(handles.your_slider,'SliderStep',[1/N_frames 1])

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Audio and Video Data에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by