so i want to take out an expresion from a gui textbox which is a diferential equation and i ahve to solve it and plot it.
source:
function pushbutton1_Callback(hObject, eventdata, handles)interv=[0 30];y0=eval(get(handles.edit2,'string'));kif=get(handles.edit1,'string');%feloszt=y0:0.1:30;
[y,t]=ode45(f(kif),interv,y0);plot (y,t,'g');
source of f.m:
function fugv=f(kif)fugv=eval(kif);
errors:
Error using evalUndefined function or variable 'y'.Error in f (line 2)fugv=eval(kif);Error in projekt2>pushbutton1_Callback (line 82)[y,t]=ode45(f(kif),interv,y0);
i dont know the syntaxis how to solve this plz help
Best Answer