你的方程不对1e^(a-bx)1y=30/(1e^(a-bx))30y=[566,632,745,755,769,789]的取值都大于30所以表达式有问题我该了下y=C/(1e^(a-bx))x=[1,2,3,4,5,6]\';y=[566,632,745,755,769,789]\';st_=[5000.50.5];ft_=fittype(\'C/(1exp(a-b*x))\',...\'dependent\',{\'y\'},\'independent\',{\'x\'},...\'coefficients\',{\'C\',\'a\',\'b\'});cf_=fit(x,y,ft_,\'Startpoint\',st_)h_=plot(cf_,\'fit\',0.95);legendoff;%turnofflegendfromplotmethodcallset(h_(1),\'Color\',[100],...\'LineStyle\',\'-\',\'LineWidth\',2,...\'Marker\',\'none\',\'MarkerSize\',6);holdon,plot(x,y,\'*\')cf_=Generalmodel:cf_(x)=C/(1exp(a-b*x))Coefficients(with95%confidencebounds):C=799.2(715.8,882.7)a=-0.1644(-0.8638,0.5349)b=0.6785(0.03906,1.318)追问谢谢但我用这个函数拟合它的S曲线怎么不行啊?拜托了!:x=[1978:1:2010];y=[566632745755769789985111013131428178219202150229226013149433851455809624168547656877210007113741256714332166141922822844264042968832074];y=800000/(11324.1*e^(-r(x-1978)))要求求出r的麻烦了!!急呀
|