function kef(f,x0,y0,xmax,kmax,ypontos)
close all
x=linspace(x0,xmax,kmax+1);
y=zeros(1,kmax+1);
h=(xmax-x0)/kmax;
y(1)=y0;
for k=1:kmax
   y(k+1)=y(k)+h*f(x(k),y(k));
end;
plot(x,y,'bo-')
if nargin==6
hold on
xx=x0:h/100:xmax;
yy=ypontos(xx);
plot(xx,yy,'r-');
legend('numerikus','pontos')
hiba=y(kmax+1)-ypontos(xmax)
hold off
end;
