请问matlab中nlinfit拟合函数怎么用
>> t = [0.25,0.5,0.75,1,1.5,2,2.5,3,3.5,4,4.5,5,6,7,8,9,10,11,12,13,14,15,16];
>> y = [30,68,75,82,82,77,68,68,58,51,50,41,38,35,28,25,18,15,12,10,7,7,4];
拟合出k1,k2,k3,函数是这样的:
请问matlab中nlinfit拟合函数怎么用
答案:1 悬赏:10 手机版
解决时间 2021-07-28 00:06
- 提问者网友:疯子也有疯子的情调
- 2021-07-27 11:50
最佳答案
- 五星知识达人网友:我住北渡口
- 2021-07-27 13:21
t = [0.25,0.5,0.75,1,1.5,2,2.5,3,3.5,4,4.5,5,6,7,8,9,10,11,12,13,14,15,16];
y = [30,68,75,82,82,77,68,68,58,51,50,41,38,35,28,25,18,15,12,10,7,7,4];
mf=@(cs,t1)cs(1)*cs(3)/(cs(1)-cs(2))*(exp(-cs(2)*t1)-exp(-cs(1)*t1));
c=lsqcurvefit(mf,rand(3,1),t,y)
mf1=c(1)*c(3)/(c(1)-c(2))*(exp(-c(2)*t)-exp(-c(1)*t));
plot(t,y,'r*',t,mf1)
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯