MATLAB: How to take user input from a radio button.

guiradio buttonuser input

Hi,
I want to take input for a certain setting from the user and based on that setting proceed forward with rest of the program. Right now my radio buttons are appearing super-imposed on top of my graph1 and rest of the outputs are displayed irrespective of the radio button selected.
Thanks. -Shilp

Best Answer

If overlapping radio buttons is your problem, then:
uicontrol('Style','Radio', 'Parent',hBtnGrp, 'HandleVisibility','off', 'Position',[15 150 70 30], 'String','Comfort', 'Tag','C');
uicontrol('Style','Radio', 'Parent',hBtnGrp, 'HandleVisibility','off', 'Position',[15 120 70 30], 'String','Sport', 'Tag','S');
Here positions values are same, change it.
Related Question