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?

 採用された回答

Adam
Adam 2015 年 9 月 1 日

0 投票

doc uibuttongroup
gives an example of how to do this.

7 件のコメント

pasxalis papakalas
pasxalis papakalas 2015 年 9 月 1 日
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
Adam
Adam 2015 年 9 月 1 日
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 2015 年 9 月 1 日
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 2015 年 9 月 2 日
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 2015 年 9 月 2 日
something like this?
pasxalis papakalas
pasxalis papakalas 2015 年 9 月 2 日
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 2015 年 9 月 2 日
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.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCommunications Toolbox についてさらに検索

質問済み:

2015 年 9 月 1 日

コメント済み:

2015 年 9 月 2 日

Community Treasure Hunt

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

Start Hunting!

Translated by