Effacer les filtres
Effacer les filtres

radiobutton commands

2 vues (au cours des 30 derniers jours)
Andy
Andy le 23 Sep 2011
Hi: I have 2 radiobutton, and a pushbutton, which when pushed, i want it ti tell me which of the radiobuttons are selected. I am usiung
value1 = get(handles.(radiobutton1), 'value')
where radiobutton1 is the tag of one of my radiobuttons, but it is saying it does not know what radiobutton1 is. any ideas?

Réponse acceptée

Walter Roberson
Walter Roberson le 23 Sep 2011
Try just
value1 = get(handles.radiobutton1, 'value')
If that doesn't work, and if you mean "tag" in the same sense it is used in handle graphics, then use
rb1h = findobj(0,'Tag','radiobutton1');
value1 = get(rb1h, 'value')
  1 commentaire
Andy
Andy le 23 Sep 2011
thanks, the first one worked, i took off the brackets, got the brackets from something else :D

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Interactive Control and Callbacks dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by