Help! How can I change the program code to avoid mistakes cased by mle()?
Show older comments
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
Answers (0)
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!