阻滞增长函数matlab拟合,matlab指数增长和阻滞增长拟合代码讲课稿

这篇博客介绍了如何使用MATLAB进行指数增长和阻滞增长模型的拟合。通过具体的代码示例,展示了针对不同公众号类型(资讯、生活、娱乐和其他)的数据,利用polyfit和lsqcurvefit函数进行模型参数估计,并通过图形展示拟合结果,以分析公众号数量随时间的变化趋势。
摘要由CSDN通过智能技术生成

《matlab指数增长和阻滞增长拟合代码讲课稿》由会员分享,可在线阅读,更多相关《matlab指数增长和阻滞增长拟合代码讲课稿(7页珍藏版)》请在人人文库网上搜索。

1、资讯类1500 据指万1000长量总500号众公0 02468101214段时间类生活400 原始数据)300型模数指增长万(型模增长阻滞量200总号100众公0 02468101214段时间 娱乐类300 原始数据)型模增长数指万200(型阻滞增长模量总100号众公0 02468101214段时间他其300 原始数据)型模增长指数万200(型长增模阻滞量总100号众公0 02468101214段时间 代码: t=1:13; x=3.04,6.63,11.13,28.43,49.22,87.85,134.11,200.00,208.69,303.03,410.73,580.00,728.57;。

2、 c=0.40,0.97,2.31,4.45,7.63,10.11,19.86,33.44,38.03,75.07,112.08,152.39,226.55; d=2.06,2.35,3.17,8.06,15.22,28.82,43.31,54.67,55.83,75.26,102.01,174.05,200.95; e=0.54,1.18,1.98,5.06,8.77,15.65,23.89,36.63,37.17,53.98,73.16,123.31,159.78; %指数增长模型 y=log(x); cc=log(c); dd=log(d); ee=log(e); a=polyfit(t。

3、,y,1); h= polyfit(t,cc,1); i= polyfit(t,dd,1); k= polyfit(t,ee,1); r=a(1); r2=h(1); r3=i(1); r4=k(1); x0=exp(a(2); x1=x0*exp(r*t); c0=exp(h(2); c1=c0*exp(r2*t); d0=exp(i(2); d1=d0*exp(r3*t); e0=exp(k(2); e1=e0*exp(r4*t); %阻滞增长模型 f=(a,t) a(1)./(1+(a(1)/x(1)-1)*exp(-a(2)*(t-t(1); f=(h,t) h(1)./(1+(h(1。

4、)/c(1)-1)*exp(-h(2)*(t-t(1); f=(i,t) i(1)./(1+(i(1)/d(1)-1)*exp(-i(2)*(t-t(1); f=(k,t) k(1)./(1+(k(1)/e(1)-1)*exp(-k(2)*(t-t(1); a=lsqcurvefit(f,800 1,t,x); h=lsqcurvefit(f,800 1,t,c); i=lsqcurvefit(f,800 1,t,d); k=lsqcurvefit(f,800 1,t,e); figure(1); subplot(2,1,1); plot(t,x,o,t,x1,r:.); x2=f(a,t);。

5、 plot(t,x,o,t,x1,r:.,t,x2,g*-) legend(原始数据,指数增长模型,阻滞增长模型,2) xlabel 时间段 公众号总量(万)ylabel title(资讯类); figure(1) subplot(2,1,2); plot(t,c,o,t,c1,r:.); c2=f(h,t); plot(t,c,o,t,c1,r:.,t,c2,g*-) legend(原始数据,指数增长模型,阻滞增长模型,2) xlabel 时间段 ylabel 公众号总量(万) title(生活类); figure(2) subplot(2,1,1); plot(t,d,o,t,d1,r:.。

6、); d2=f(i,t); plot(t,d,o,t,d1,r:.,t,d2,g*-) legend(原始数据,指数增长模型,阻滞增长模型,2) xlabel 时间段 ylabel 公众号总量(万) title(娱乐类); figure(2) subplot(2,1,2); plot(t,e,o,t,e1,r:.); e2=f(k,t); plot(t,e,o,t,e1,r:.,t,e2,g*-) legend(原始数据,指数增长模型,阻滞增长模型,2) xlabel 时间段 ylabel 公众号总量(万) title(其他); a?r x?(1)?k1?b?e娱乐类 其他类 公众号总量 生活。

7、类 参数 资讯类 a 6225441365.1811.15810.459?2 51646715301.5247.b10888?9. 0.24610.23130.1660.1740.182k 各个领域公众号对比图800 量总公众号类讯资700类活生类乐娱类其他600500400e3002001000 0510152025x 程序代码: x=1:2:26; y=3.04,6.63,11.13,28.43,49.22,87.85,134.11,200.00,208.69,303.03,410.73,580.00,728.57; b=2.04,2.14,3.68,10.86,17.60,33.27,4。

8、7.05,75.26,77.66,88.72,123.48,130.25,141.29; c=0.40,0.97,2.31,4.45,7.63,10.11,19.86,33.44,38.03,75.07,112.08,152.39,226.55; d=2.06,2.35,3.17,8.06,15.22,28.82,43.31,54.67,55.83,75.26,102.01,174.05,200.95; e=0.54,1.18,1.98,5.06,8.77,15.65,23.89,36.63,37.17,53.98,73.16,123.31,159.78; st_ = 500 30 0.2 ;。

9、 ft_ = fittype(a0/(1+b0*exp(-k0*(x-1),. dependent,y,independent,x,. coefficients,a0, b0,k0); cf_ = fit(x,y,ft_,Startpoint,st_) plot(cf_,fit,0.95);hold on,plot(x,y,ro) f1t_ = fittype(a1/(1+b1*exp(-k1*(x-1),. dependent,b,independent,x,. coefficients,a1, b1,k1); c1f_ = fit(x,b,f1t_,Startpoint,st_) plot。

10、(c1f_,fit,0.95);hold on,plot(x,b,g*) f2t_ = fittype(a2/(1+b2*exp(-k2*(x-1),. dependent,c,independent,x,. coefficients,a2, b2,k2); c2f_ = fit(x,c,f2t_,Startpoint,st_) plot(c2f_,fit,0.95);hold on,plot(x,c,b+) f3t_ = fittype(a3/(1+b3*exp(-k3*(x-1),. dependent,d,independent,x,. coefficients,a3, b3,k3); c3f_ = fit(x,d,f3t_,Startpoint,st_) plot(c3f_,fit,0.95);hold on,plot(x,d,*) f4t_ = fittype(a4/(1+b4*exp(-k4*(x-1),. dependent,e,independent,x,. coefficients,a4, b4,k4); c4f_ = fit(x,e,f4t_,Startpoint,st_)。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值