clear;
x=[0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0];
y=[-0.6,0,0.1,0.2,0.5,0.6,0.4,0.3,0.4,0.5,0.9];
plot(x,y,'ro');
p=polyfit(x,y,10);
hold('on');
px=0:0.01:1;
py=polyval(p,px);
plot(px,py,'b-');
hold('off');