请问matlab中nlinfit拟合函数怎么用

学习 时间:2026-06-05 16:31:51 阅读:4102
请问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,函数是这样的:

最佳回答

单薄的雪糕

执着的仙人掌

2026-06-05 16:31:51

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)

最新回答共有2条回答

  • 危机的月饼
    回复
    2026-06-05 16:31:51

    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)

上一篇 连词成句the ,you ,a ,decision ,will ,the ,more ,you ,get ,earlie

下一篇 五年级暑假作业(数学题)