how to extract slider's value
Afficher commentaires plus anciens
I'm working in MATLAB and want to obtain the value of a slider and use it as an input for calculations in another function. How can I retrieve the slider's value and pass it to another function? I attempted to use get(h,'value'), but encountered an error. How should I go about this?
Error encountered while using get:
Error using matlab.graphics.Graphics/get
Property value not found in class matlab.graphics.GraphicsPlaceholder, or is not present in all
elements of the array of class matlab.graphics.GraphicsPlaceholder.
Here's what I tried doing:
hslide(i) = uicontrol('style','slider','units','normalized');
value = get(hslide,'value');
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Whos 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!