How do I set slider step value in Matlab?
Afficher commentaires plus anciens
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
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Entering Commands dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!