Help! How can I change the program code to avoid mistakes cased by mle()?
显示 更早的评论
My program code:
d=[ 0.2000 0.3000 1.0000 0.5000 0.2000 0.5000 0.1000 0.8000 0.1000]';
lgsp=@(x,m,b)(1/(1+exp(-(10*x-m)/b)));
phat=mle(d,'pdf',lgsp,'start',[0.3 1]);
The mistakes:
??? Error using ==> mlecustom>llf_pdfcdf at 443
The PDF function returned negative or zero values.
Error in ==> fminsearch at 195
fv(:,1) = funfcn(x,varargin{:});
Error in ==> mlecustom at 186
[phat,nll,err,output] = ...
Error in ==> mle at 225
phat = mlecustom(data,varargin{:});
Thank You!
ChangyiXiao
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!