a=X1\\y; disp(a); x2=1:12;
p=polyfit(t,y,2); y2=polyval(p,x2); figure(1)
plot(t,y, 'o',x2,y2)
title('房价走势拟合曲线') xlabel('年份序号') ylabel('房价(元)')
- 30 -
a=X1\\y; disp(a); x2=1:12;
p=polyfit(t,y,2); y2=polyval(p,x2); figure(1)
plot(t,y, 'o',x2,y2)
title('房价走势拟合曲线') xlabel('年份序号') ylabel('房价(元)')
- 30 -