MLE program troubleshoot for the error "the pdf function returned negative or zero values"
이전 댓글 표시
i have the following code and the error msg is
"Error using mlecustom>llf_pdfcdf (line 440)
The PDF function returned negative or zero values."
what is to be changed to get the lamda value?pls help me
X=[0;1;1;1;1;1;1;1;1;1;1]
Y=[0;0;3.16060256660987;4.32332341640756;4.75106456578097;4.90842176024353;4.96631024416752;4.98760622991804;4.99544058622424;4.99832268520062;4.99938295029261] t=[0:1:10]'
data=[X Y]
fn_mle=@(lamda, X, t) lamda(1)*(1-exp(-lamda(2).*t)).*X
phat=mle(data(:,2),'pdf',fn_mle,'start',[5 1],'lowerbound', [0.01 0.01], 'upperbound', [100 100]);
답변 (1개)
sun
2021년 7월 21일
0 개 추천
Use the 'lowerbound' and 'upperbound'
카테고리
도움말 센터 및 File Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!