clear all
close all

s=10/5;
a=-5; b=5;
x=a:s:b;

y=1./(1+x.^2); x=x'; y=y';

[n,m]=size(x);

egy=polyfit(x,y,n-1)

z=a:0.01:b;
fz=polyval(egy,z);

fzmin=min(fz);
fzmax=max(fz);

axis([a,b,fzmin,fzmax]);
hold on
plot(x,y,'o')
plot(z,fz)
hold off

