因为不知道你的fit1使用的是什么公式,我随便用了个4次多项式
>> x=[1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000];
y=[3199.54 3418.15 3829.58 4334.87 4430.08 4379.65 4520.58 4980.56 5234.38 5900.85 6357.27 6310.54 6153.13 6153.41 6261.43 6312.91];
>> cftool
>> fit1
fit1 =
Linear model Poly4:
fit1(x) = p1*x^4 + p2*x^3 + p3*x^2 + p4*x + p5
Coefficients (with 95% confidence bounds):
p1 = -0.1999 (-0.6575, 0.2577)
p2 = 1591 (-2056, 5238)
p3 = -4.751e+006 (-1.565e+007, 6.149e+006)
p4 = 6.305e+009 (-8.174e+009, 2.078e+010)
p5 = -3.137e+012 (-1.035e+013, 4.075e+012)
>> x1=[2001:2010]';
>> y1=fit1(x1)
y1 =
1.0e+004 *
0.5727
0.5053
0.4071
0.2723
0.0947
-0.1325
-0.4165
-0.7649
-1.1860
-1.6885
Save to workplace默认保存文件名是fittedmodel,你用这个应该就没事了。注意右边的工作区啊