Is there a way to make Two Radio Button Groups work together?
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have two radio button groups, and I want them to work where the selected radio buttons of both groups create one statement. Is there a way to code this. I have tried with a switch statement inside a switch statement and it does not seem to call to the values in the selected switch statement. Thanks for the adivce.
function handles = Calcsres_SelectionChangeFcn(hObject, eventdata)
% Pulls data from the handles Structure
Text4 = handles.pwrout_tT;
Text2 = handles.Tr_tT;
Text3 = handles.W_tT;
Text1 = handles.T_XT;
switch get(eventdata.NewValue, 'Tag')% Gets the tag of the Dialog box
case 'res_Tr'
set(Text1, 'string', 'Hooray');
switch get(eventdata.NewValue, 'Tag') % Gets the tag of the Dialog box
case 'fluid_V'
set(handles.Run, 'Callback', {@Run1_Callback, handles});
case 'fluid_3dFlow'
set(handles.Run, 'Callback', {@Run2_Callback, handles});
case 'fluid_deltaP'
set(handles.Run, 'Callback', {@Run3_Callback, handles});
end
case 'res_Nf'
set(Text1, 'string', 'That');
% set(handles.Run, 'Callback', {@Run2_Callback, handles});
case 'res_b'
% handles.apt_Calc = ((Trans*12)/Num_frac)^(1/3); set(Text1, 'string', 'work') case 'res_k'
% handles.perm_Calc = handles.apt_Calc^2/12; set(Text1, 'string', 'king') end
% Saves the data to the Gui Structure
guidata(hObject, handles);
end
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Interactive Control and Callbacks dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!