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?

 Respuesta aceptada

Adam
Adam el 1 de Sept. de 2015
doc uibuttongroup
gives an example of how to do this.

7 comentarios

pasxalis papakalas
pasxalis papakalas el 1 de Sept. de 2015
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.
pasxalis papakalas
pasxalis papakalas el 1 de Sept. de 2015
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.
Adam
Adam el 2 de Sept. de 2015
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.
pasxalis papakalas
pasxalis papakalas el 2 de Sept. de 2015
something like this?
pasxalis papakalas
pasxalis papakalas el 2 de Sept. de 2015
when press the button will be choose the user one of the radio button and will be implement the code for the picture.. right?
Adam
Adam el 2 de Sept. de 2015
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.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Communications Toolbox en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 1 de Sept. de 2015

Comentada:

el 2 de Sept. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by