seaying 发表于 2011-6-11 15:57

nlinfit函数问题,求各位帮帮忙

x=;
>> y=;
>> myfunc=inline('(beta(2)*beta(3)*(exp(-beta(1)*x)-exp(-beta(2)*x)))/(beta(2)-beta(1))','beta','x');
>> beta=nlinfit(x,y,myfunc,);
Warning: Divide by zero.
> In inlineeval at 13
  In inline.subsref at 25
  In nlinfit at 74
Warning: Divide by zero.
> In inlineeval at 13
  In inline.subsref at 25
  In nlinfit at 152
Warning: Matrix is singular to working precision.
> In nlinfit at 161

>> k1=beta(1),k2=beta(2),k3=beta(3);

k1 =

   NaN


k2 =

   NaN

>> 为什么会出现警告呢?而且还没有数值结果,求指教

seaying 发表于 2011-6-11 15:57

在线等结果

seaying 发表于 2011-6-11 16:02

感觉是myfunc=inline('(beta(2)*beta(3)*(exp(-beta(1)*x)-exp(-beta(2)*x)))/(beta(2)-beta(1))','beta','x');
出问题的

madio 发表于 2011-6-11 21:38

提示的是出现除数为零的问题了!

alair003 发表于 2012-2-6 10:47

页: [1]
查看完整版本: nlinfit函数问题,求各位帮帮忙