% Euler's method
function [x,y]=EulersMethodFn(x0,y0,h,N,f)

x=x0+(0:N)'*h;
y=zeros(N+1,1);
y(1)=y0;
for k=1:N
    y(k+1)=y(k)+h*f(x(k),y(k));
end