hi....radio button and process button problem

have 3 radio button (edge detection, Noise removal and magnification)how do I use the function that we want to implement over our picture? and one button process(when I press the button to select one of the three options)how can i do this?

 Accepted Answer

doc uibuttongroup
gives an example of how to do this.

7 Comments

have this.and i want to creat radio button(button group i quess) i think is better (because one of the three to be always active)How to link Radio button and Push button .if you understand what I mean
If you want to do something under a pushbutton that is determined by a radiobutton you can just do something like this under the pushbutton:
option = handles.filterButtonGroup.SelectedObject;
switch option
case handles.radiobuttonEdgeDetection
doEdgeDetection(...)
case handles.radionbuttonNoiseRemoval
doNoiseRemoval(...)
case handlesradiobuttonMagnification
doMagnification(...)
end
making the obvious changes to use whatever you tagged your radio buttons and button group.
something like this..and when i push the button will be choose one of the three or four options (edge dector CAND ,CXOR noise removal magnification)and apply the corresponding code.
You don't really need the pushbutton though, you could just do the update in the SelectionChangedFcn of the uibuttongroup to avoid the user having to first click a radio button then a push button.
when press the button will be choose the user one of the radio button and will be implement the code for the picture.. right?
Something like that. I'd never use a global variable personally, but the idea seems right with the relevant code run from the cases of the switch statement.

Sign in to comment.

More Answers (0)

Categories

Find more on Communications Toolbox in Help Center and File Exchange

Asked:

on 1 Sep 2015

Commented:

on 2 Sep 2015

Community Treasure Hunt

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

Start Hunting!