error using radion button

1 回表示 (過去 30 日間)
FIR
FIR 2012 年 4 月 5 日
I have two button groups
each one has 3 radio button which contains function of noise ,
salt and pepper
guassian
speckle
next button group the values
0.09
0.02
.05
now the problem is if i select salt and pepper ,and i have to chose the corresponging noise value
i have coded for first,please tell how to combine those two

採用された回答

Image Analyst
Image Analyst 2012 年 4 月 5 日
Inside the callback for group1, get the value from the radio buttons of group2. Each radio button has a tag and a value, even though they all share a common callback routine.
value1 = get(handles.radioButton1, 'value');
value2 = get(handles.radioButton2, 'value');
value3 = get(handles.radioButton3, 'value');
% Set the noiseValue
if value1
noiseValue = 0.09; % or get the 'String' property and convert to double.
elseif value2
noiseValue = 0.02;
else
noiseValue = 0.05;
end

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDesktop についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by