用matlab计算logistic中参数···~t=[0,10,22,32,42,51,61,76,87]y=[3,25,27,24,54,91,169,160,176]logistic方程为:y=K/1+a*exp(-rt)请问 怎么用matlab计算方程中的三个参数(K,a,r)呢?我自己算的K=195.5511,r=0.2241.好像不对
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/17 12:26:47
用matlab计算logistic中参数···~t=[0,10,22,32,42,51,61,76,87]y=[3,25,27,24,54,91,169,160,176]logistic方程为:y=K/1+a*exp(-rt)请问 怎么用matlab计算方程中的三个参数(K,a,r)呢?我自己算的K=195.5511,r=0.2241.好像不对
用matlab计算logistic中参数···~
t=[0,10,22,32,42,51,61,76,87]
y=[3,25,27,24,54,91,169,160,176]
logistic方程为:y=K/1+a*exp(-rt)
请问 怎么用matlab计算方程中的三个参数(K,a,r)呢?
我自己算的K=195.5511,r=0.2241.好像不对呢郁闷了
还有怎么拟合数据呀?看参数拟合的R平方?
如果能给出具体方法就更好了~
还有希望标出最后计算出的参数分别都是什么,我看别人的提问里面 有的给出了计算方法 但是我都不知道哪个是哪个呀.
用matlab计算logistic中参数···~t=[0,10,22,32,42,51,61,76,87]y=[3,25,27,24,54,91,169,160,176]logistic方程为:y=K/1+a*exp(-rt)请问 怎么用matlab计算方程中的三个参数(K,a,r)呢?我自己算的K=195.5511,r=0.2241.好像不对
t=[0,10,22,32,42,51,61,76,87]';
y=[3,25,27,24,54,91,169,160,176]';
st_ = [200 0.1 0.2];
ft_ = fittype('K./(1+a*exp(-r*t))','dependent',{'y'},'independent',{'t'},'coefficients',{'K','a','r'});
[cf_,good]= fit(t,y,ft_ ,'Startpoint',st_)
h_ = plot(cf_,'fit',0.95);
legend off; % turn off legend from plot method call
set(h_(1),'Color',[1 0 0],...
'LineStyle','-','LineWidth',2,...
'Marker','none','MarkerSize',6);
hold on,plot(t,y,'*')
cf_ =
General model:
cf_(t) = K./(1+a*exp(-r*t))
Coefficients (with 95% confidence bounds):
K = 178.5 (141.5,215.5)
a = 243.4 (-629.6,1116)
r = 0.1142 (0.03371,0.1946)
good =
sse:1.7508e+003
rsquare:0.9554 %(R平方)
dfe:6
adjrsquare:0.9405
rmse:17.0821