n=length(tvalues) hold off plot(tvalues,yvalues,'g*') hold on A=vander(tvalues) b=yvalues' x=A\b tt=[tvalues(1)-0.2:.2:tvalues(n)+0.2]; yy=polyval(x,tt); plot(tt,yy,'r-')