用Matlab程序对logistic人口模型进行拟合?

问题描述:

用Matlab程序对logistic人口模型进行拟合?
数据:x=[1790 1800 1810 1820 1830 1840 1850 1860 1870 1880 1890 1900 1910 1920 1930 1940 1950 1960 1970 1980 1990 2000];
y=[3.9 5.3 7.2 9.6 12.9 17.1 23.2 31.4 38.6 50.2 62.9 76.0 92.0 106.5 123.2 131.7 150.7 179.3 204.0 226.5 251.4 281.4];
用matlab程序logistic人口模型进行拟合?
还有x(t)=xm+(-xm+x0)exp(-rt)?
很着急的……
关键是那个图……
一定要用Matlab程序编写~很着急的~
1个回答 分类:综合 2014-11-26

问题解答:

我来补答
使用cftool
logistic人口模型进行拟合
General model:
       f(x) = a/(1+b*exp(-k*(x-1790)))
Coefficients (with 95% confidence bounds):
       a =       446.6  (371.1, 522)
       b =       57.01  (48.93, 65.09)
       k =     0.02155  (0.01945, 0.02365)
Goodness of fit:
  SSE: 457.7
  R-square: 0.9972
  Adjusted R-square: 0.9969
  RMSE: 4.908
x(t)=xm+(-xm+x0)exp(-rt)
Fit computation did not converge:
Maximum number of function evaluations exceeded. Increasing
MaxFunEvals (in fit options) may allow for a better fit, or 
the current equation may not be a good model for the data.
Fit found when optimization terminated:
General model:
       f(x) = ym+(-ym+3.9)*exp(-r*(x-1790))
Coefficients (with 95% confidence bounds):
       r =  3.682e-006  (-0.005956, 0.005964)
       ym =   2.66e+005  (-4.301e+008, 4.307e+008)
Goodness of fit:
  SSE: 2.485e+004
  R-square: 0.8455
  Adjusted R-square: 0.8378
  RMSE: 35.25 
matlab程序如下:
----------------------------------------------
x=[1790 1800 1810 1820 1830 1840 1850 1860 1870 1880 1890 1900 1910 1920 1930 1940 1950 1960 1970 1980 1990 2000];
y=[3.9 5.3 7.2 9.6 12.9 17.1 23.2 31.4 38.6 50.2 62.9 76.0 92.0 106.5 123.2 131.7 150.7 179.3 204.0 226.5 251.4 281.4];
x=x';y=y';
st_ = [500 20 0.2];
ft_ = fittype('a/(1+b*exp(-k*(x-1790)))' ,...
     'dependent',{'y'},'independent',{'x'},...
     'coefficients',{'a', 'b', 'k'});
cf_ = fit(x,y,ft_ ,'Startpoint',st_)
----------------------------------------------
运行结果
cf_ =
     General model:
       cf_(x) = a/(1+b*exp(-k*(x-1790)))
     Coefficients (with 95% confidence bounds):
       a =       446.6  (371.1, 522)
       b =       57.01  (48.93, 65.09)
       k =     0.02155  (0.01945, 0.02365)
 
 
展开全文阅读
剩余:2000
上一页:示意图也请画出
下一页:拜托详细解答