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

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.
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.
something like this?
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 Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

질문:

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