How do I set slider step value in Matlab?
이전 댓글 표시
I am using a slider and I've set it's maximum value to +12 and minimum value to -12. I want that with every click on slider and arrow, it should increment/decrement the value of slider by 1. I've tried this code. Apparently, it should give me a total of 25 steps from +12 to -12 but it is giving me 26 steps. Also, how can I display the current value of slider using static text?
The code is given below:
function slider1_Callback(hObject, eventdata, handles)
set(handles.slider1,'min',-12);
set(handles.slider1,'max',12);
set(handles.slider1,'SliderStep',[0.04,0.04]);
end
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Labels and Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!