How do I automatically change radio button selection?

2 Ansichten (letzte 30 Tage)
Iulia Baginean
Iulia Baginean am 14 Jul. 2021
Kommentiert: Stephen23 am 14 Jul. 2021
Hello,
I'm working with radio buttons within a group. I have 6 radio buttons: S1, S2, S3, S4, S5, S6. I need to automatically change them, sort of an incrementation. I want to have a loop and not change them manually, as I have to make multiple combinations with other button groups throughout the code.
I taught about reading current button:
CurrentButtonA=get(handles.ButtonGroupA, 'SelectedObject');
Which will output one of the 6 selected buttons. Can I increment SelectedObject?
Thanks in advance.
  1 Kommentar
Stephen23
Stephen23 am 14 Jul. 2021
See my FEX submission here:
Try the function BREWERMAP_VIEW: it slowly iterates through all of color palettes, selecting the corresponding button each time. The quite simple loop for this can be found in the nested function bmvDemo.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Produkte


Version

R2015b

Community Treasure Hunt

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

Start Hunting!

Translated by