Help with slider in matlab GUI
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
aurc89
am 28 Sep. 2014
Beantwortet: Image Analyst
am 28 Sep. 2014
In a GUI file, how can I use a slider to increase or decrease by one unit the number contained into an edit text box ? Thanks
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 28 Sep. 2014
Set up the slider like this in your start up code (untested):
sliderMin = get(handles.slider, 'Min');
sliderMax = get(handles.slider, 'Max');
increment = 1/(sliderMax-sliderMin);
sliderStep = set(handles.slider, 'Step', [increment, 2*increment]);
To get the integer value later:
sliderValue = round(get(handles.slider, 'Value'));
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Debugging and Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!