function sol=euler1(fcn,a,b,y0,N)
%generates euler soln to y'=f(x,y) in N steps
%initial condition is y(a)=y0
h=(b-a)/N;
x = a+(0:N)*h;
y(1)=y0;
for k=1:N
    y(k+1)=y(k)+h*feval(fcn,x(k),y(k));
end
sol=[x',y'];