%Polyfit (interpolace)
x = linspace(0,7,7);
y = [0 1 0 1 0 1 0];
xx = linspace(0,7,100);
p = polyfit(x,y,6);
yy1 = polyval(p,xx);
yy2 = spline(x,y,xx);
plot(x,y,'ko',xx,yy1,'k',xx,yy2,'k--')














