how to use "range" in uislider
Mostrar comentarios más antiguos
fig = uifigure;
s = uislider(fig,"range",1:50);
Error using uislider
Unrecognized property range for class Slider.
Error in untitled6 (line 2)
s = uislider(fig,"range",1:50);
i want this :

9 comentarios
Note that the "range" option is only supported since R2023b:
Presumably you are using an earlier version.
shamal
el 18 de Mayo de 2024
Stephen23
el 18 de Mayo de 2024
Overlay an AXES object, add two TEXT objects, modify their positions in the slider callbacks.
shamal
el 19 de Mayo de 2024
Stephen23
el 19 de Mayo de 2024
Of course TEXT objects have a writeable POSITION property:
TEXT objects do not have a LABEL property.
Stephen23
el 19 de Mayo de 2024
"I want to know information about position in "1" and "2""
You want the VALUE property.
"it creates a new figure for me and it's not good"
Specify an existing figure as the parent. Even better: create axes first, exactly as I wrote in my earlier comment.
Stephen23
el 20 de Mayo de 2024
From my knowledge it's a bit difficult."
Certainly it would be quite fiddly to implement.
A simpler approach is to have some fixed (i.e. unmoving) e.g. UICONTROL displaying the values.
Respuestas (1)
Voss
el 18 de Mayo de 2024
1 voto
s = uislider(fig,"Limits",[1 50]);
https://www.mathworks.com/help/matlab/ref/matlab.ui.control.slider-properties.html
2 comentarios
Voss
el 18 de Mayo de 2024
s = uislider(fig,"range","Limits",[1 50]);
Categorías
Más información sobre Labels and Annotations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


