作业帮 > 综合 > 作业

matlab 阻滞模型

来源:学生作业帮 编辑:百度作业网作业帮 分类:综合作业 时间:2024/06/13 08:34:24
matlab 阻滞模型
数据:t=[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26];
y=[56 57 58 65 82 114 117 120 124 124 122 122 122 119 119 118 118 116 117 115 117 117 117 117 117 115];
模型方程:y=c/(1+exp(a+bt))
matlab 阻滞模型
t=[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26]';
y=[56 57 58 65 82 114 117 120 124 124 122 122 122 119 119 118 118 116 117 115 117 117 117 117 117 115]';
st_ = [1 -0.1 150];
ft_ = fittype('c/(1+exp(a+b*t))','dependent',{'y'},'independent',{'t'},'coefficients',{'a', 'b','c'});
[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) = c/(1+exp(a+b*t))
Coefficients (with 95% confidence bounds):
a = 1.158 (0.639, 1.677)
b = -0.4774 (-0.6285, -0.3263)
c = 119.8 (115.8, 123.8)
good =
sse: 1.3403e+003
rsquare: 0.8951
dfe: 23
adjrsquare: 0.8860
rmse: 7.6338