%Euler method with initial conditions in 1st row
function [t,x]=neweuler(fh,t0,x0,tmax,npts)
n=npts-1;
h=(tmax-t0)/n;
t(1)=t0;
x(1)=x0;
for k=1:n
    x(k+1)=x(k)+h*fh(t(k),x(k));
    t(k+1)=t(k)+h;
end;