views:

31

answers:

1

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.

EDIT by jonas: The question is a follow-up to this question.

+2  A: 

Without seeing how the radio buttons are defined, my guess would be that you have the incorrect name for the function. The callback function is named ics_si_Callback, not ics_si.

gnovice
That's my guess as well.
Jonas