急!怎么用matlab求解Logistic模型中的三个参数?
答案:1 悬赏:70
解决时间 2021-02-28 03:06
- 提问者网友:佞臣
- 2021-02-27 23:31
急!怎么用matlab求解Logistic模型中的三个参数?
最佳答案
- 二级知识专家网友:夜风逐马
- 2021-02-28 00:20
建立m函数文件存为logistic1
function f=logistic1(b)
t=[0,5,10,24,33,48,57,72,96,120,144,168,192,216];y=[0,0.028,0.103,0.336,0.450,0.597,0.716,0.778,0.835,0.849,0.816,0.839,0.811,0.816];
f = y-b(1)./(1+b(2).*exp(-b(3).*t));
b0=[10,2,2];
>> b=leastsq('logistic1',b0)
b =
0.8221 13.91730.0818
或者cftool
General model:
f(x) = b/(1+a*exp(-k*x))
Coefficients (with 95% confidence bounds):
a = 13.92(6.301, 21.53)
b = 0.822(0.7911, 0.853)
k = 0.08184(0.06479, 0.0989)
Goodness of fit:
SSE: 0.01404
R-square: 0.9898
Adjusted R-square: 0.9879
RMSE: 0.03572
function f=logistic1(b)
t=[0,5,10,24,33,48,57,72,96,120,144,168,192,216];y=[0,0.028,0.103,0.336,0.450,0.597,0.716,0.778,0.835,0.849,0.816,0.839,0.811,0.816];
f = y-b(1)./(1+b(2).*exp(-b(3).*t));
b0=[10,2,2];
>> b=leastsq('logistic1',b0)
b =
0.8221 13.91730.0818
或者cftool
General model:
f(x) = b/(1+a*exp(-k*x))
Coefficients (with 95% confidence bounds):
a = 13.92(6.301, 21.53)
b = 0.822(0.7911, 0.853)
k = 0.08184(0.06479, 0.0989)
Goodness of fit:
SSE: 0.01404
R-square: 0.9898
Adjusted R-square: 0.9879
RMSE: 0.03572
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯