我的作业题给你看下clcclearx=[0 1 2 3 4 5 6];y=[2 3 3.5 6 5.4 5.6 9.8];p=polyfit(x,y,4)x1=0:0.02:6;y1=polyval(p,x1);plot(x,y,'*',x1,y1,'k')