数学建模社区-数学中国
标题:
求高手知道指数函数拟合
[打印本页]
作者:
Losing
时间:
2015-5-5 12:10
标题:
求高手知道指数函数拟合
x=5:5:70;
y=[0.4293 0.2417 0.1240 0.0604 0.0493 0.0270 0.0223 0.0095 0.0079 0.0048 0.0064 0.0032 0.0016 0.0127];
y=c*exp(-c*x);
C是系数,想通过上面数据求出c。
作者:
光之仑
时间:
2015-5-5 12:30
General model Exp1:
f(x) = a*exp(b*x)
Coefficients (with 95% confidence bounds):
a = 0.7751 (0.7252, 0.825)
b = -0.1184 (-0.1262, -0.1105)
Goodness of fit:
SSE: 0.000652
R-square: 0.9966
Adjusted R-square: 0.9964
RMSE: 0.007371
作者:
光之仑
时间:
2015-5-5 12:32
General model:
f(x) = c*exp(-c*x)
Coefficients (with 95% confidence bounds):
c = 0.1458 (-0.8828, 1.174)
Goodness of fit:
SSE: 0.1899
R-square: 0.02284
Adjusted R-square: 0.02284
RMSE: 0.1209
作者:
liwenhui
时间:
2017-6-5 10:40
LINGO也能实现:
SETS:
VAR/ 1..14/: X, Y;
ENDSETS
DATA:
Y= 0.4293 0.2417 0.1240 0.0604 0.0493 0.0270 0.0223 0.0095 0.0079 0.0048 0.0064 0.0032 0.0016 0.0127;
ENDDATA
CALC:
X( 1) = 5;
@FOR( VAR( I)| I #GE# 2: X( I) = X( I - 1) + 5);
ENDCALC
MIN=RS;
RS = @SUM( VAR( I): (C * @EXP( -C * X( I)) - Y( I))^ 2);
CALC:
@SET('GLOBAL', 1);
ENDCALC
复制代码
结果:
Global optimal solution found.
Objective value: 0.1899075
Objective bound: 0.1899066
Infeasibilities: 0.000000
Extended solver steps: 103
Total solver iterations: 18999
Variable Value Reduced Cost
RS 0.1899075 0.000000
C 0.1458114 0.000000
X( 1) 5.000000 0.000000
X( 2) 10.00000 0.000000
X( 3) 15.00000 0.000000
X( 4) 20.00000 0.000000
X( 5) 25.00000 0.000000
X( 6) 30.00000 0.000000
X( 7) 35.00000 0.000000
X( 8) 40.00000 0.000000
X( 9) 45.00000 0.000000
X( 10) 50.00000 0.000000
X( 11) 55.00000 0.000000
X( 12) 60.00000 0.000000
X( 13) 65.00000 0.000000
X( 14) 70.00000 0.000000
Y( 1) 0.4293000 0.000000
Y( 2) 0.2417000 0.000000
Y( 3) 0.1240000 0.000000
Y( 4) 0.6040000E-01 0.000000
Y( 5) 0.4930000E-01 0.000000
Y( 6) 0.2700000E-01 0.000000
Y( 7) 0.2230000E-01 0.000000
Y( 8) 0.9500000E-02 0.000000
Y( 9) 0.7900000E-02 0.000000
Y( 10) 0.4800000E-02 0.000000
Y( 11) 0.6400000E-02 0.000000
Y( 12) 0.3200000E-02 0.000000
Y( 13) 0.1600000E-02 0.000000
Y( 14) 0.1270000E-01 0.000000
Row Slack or Surplus Dual Price
1 0.1899075 -1.000000
2 0.000000 -1.000000
复制代码
欢迎光临 数学建模社区-数学中国 (http://www.madio.net/)
Powered by Discuz! X2.5