Problems with the three-parameter Weibull distribution
이전 댓글 표시
Hi, I am working with the three-parameters Weibull distribution because my dataset contains only negative numbers. The code below is found in the documentation and obviously works correctly.
However, I don't fully understand how it works. I have searched on-line and in the documentation but I can't get around the two lines that I have highlighted in bold. I don't understand how to assign the values to the start vector and how to assign values to lower and upper bound. Any reference to the 'Weight' data would be helpful.
Thank you
Kind Regards
Federico
load carsmall
x = linspace(0,6000);
f_def = @(x,a,b,c) (x>c).*(b/a).*(((x-c)/a).^(b-1)).*exp(-((x-c)/a).^b);
try
mle(Weight,'pdf',f,'Start',[1700 2 1500])
catch ME
disp(ME)
end
opt = statset('FunValCheck','off');
params = mle(Weight,'pdf',f,'Start',[1700 2 1500],'Options',opt, ...
'LowerBound',[0 0 -Inf],'UpperBound',[Inf Inf min(Weight)])
figure
histogram(Weight,8,'Normalization','pdf')
hold on
plot(x,f(x,params(1),params(2),params(3)),'LineWidth',2)
hold off
답변 (1개)
카테고리
도움말 센터 및 File Exchange에서 Weibull Distribution에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!