From: yekhiel on 20 Nov 2009 14:23 Hi, I am also making a similar gui the only difference is that,I want to write a code so that when I click on a push button,it checks which radio button is selected and based on this computes the value of a variable u. pls can someone help me on the code to write at the callbacks of the push button,group button and radio buttons.Any assistance will be appreciated. "Peter Russo" <peter.russo(a)gmail.com> wrote in message <h20249$p1u$1(a)fred.mathworks.com>... > Hi, > I am currently trying to make a gui that contains a button group with three radio buttons in it. I want to write the code so when I click on a push button, it checks which of the radio buttons is selected. Currently I have it read in which one is selected using the get() command with the SelectedObject property. The problem is that this returns a number, not the tags that I entered for the radio buttons. The numbers that get returned are 277.0029, 278.0029, and 279.0029. I could write a switch statement for this to convert the three values into the tags I want, but I'm concerned that these values are arbitrary, and that they might change in the future. Also the code would just look/work a lot better if the get command just returned the tag. The get command that I use is shown below ('radius_grouping' is the tag of the button group) > > x=get(handles.radius_grouping,'SelectedObject') > > Does anyone know how to fix this? Thanks
|
Pages: 1 Prev: Matlab c++ compiled dll: problem mxarray double dim Next: bar plot BaseValue |