matlab 怎样处理使结果前两个数据不为0.0000 -0.0000%对居民消费水平拟合x=[19901991199219931994199519961997199819992000200120022003200420052006200720082009];%年份y=[1227135315281850253632173906423343974599509955516098703381749558
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/17 11:21:59
matlab 怎样处理使结果前两个数据不为0.0000 -0.0000%对居民消费水平拟合x=[19901991199219931994199519961997199819992000200120022003200420052006200720082009];%年份y=[1227135315281850253632173906423343974599509955516098703381749558
matlab 怎样处理使结果前两个数据不为0.0000 -0.0000
%对居民消费水平拟合
x=[1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
];%年份
y=[1227
1353
1528
1850
2536
3217
3906
4233
4397
4599
5099
5551
6098
7033
8174
9558
11129
12762
14751
15790
];%居民消费水平
p=polyfit(x,y,3)
x1=1990:0.01:2009;
y1=polyval(p,x1);
plot(x,y,'*r',x1,y1,'-b')
matlab 怎样处理使结果前两个数据不为0.0000 -0.0000%对居民消费水平拟合x=[19901991199219931994199519961997199819992000200120022003200420052006200720082009];%年份y=[1227135315281850253632173906423343974599509955516098703381749558
format long