hi, i am writing a matlab script that take function f which is a function of x and y and evaluate function f for some values of x and y. however i cannot get function, in my following code, f is seen as an array not a function. how can i get f. how can i evaluate at some points?
thanks.
function backEuler(f,x0,y0,h,N)x(1)=x0;y(1)=y0;for i=1:N x(i+1)=x(i)+h; y_temp=y(i)+h*x(i)*x(i); y(i+1)=y(i)+h*f(x(i+1),y_new);endplot(x,y);end
Best Answer