calling function in radiobutton group
Posted
by vijisai
on Stack Overflow
See other posts from Stack Overflow
or by vijisai
Published on 2010-04-19T14:10:28Z
Indexed on
2010/04/19
14:13 UTC
Read the original article
Hit count: 213
thank you very much.
with your help, i am now able to call the function for each radio button. however, i get a error message
Reference to non-existent field 'ics_si'
ics_si is my function, which has the following code, i do not know where i am making a mistake
i have created the edit box for user to input the values for bore and stroke. and vdisp is calculated and the result is displayed in the third edit box.
function ics_si_Callback(hObject, eventdata, handles)
b = str2double(get(handles.bore,'String')); s = str2double(get(handles.stroke,'String')); vdisp = (pi * b * b * s*10^(-3))/4; set(handles.vdisp,'String',vdisp);
this code must be called when i press the first or second radio button. i.e. when the radio button is pressed, it should call the function ics_si, calculate it and display the result. how to get this.
© Stack Overflow or respective owner