Fitting a log-normal distribution
이전 댓글 표시
Hello,
I'm trying to plot a fit to a log-normal distribution. I have the statistics and machine learning toolbox, but I am confused as how to apply the log-normal fit function to this data.
Below is some minimum working code to create a log-normal distribution, but I do not know how to progress further with this fit. The 'lognfit' function requires only a 1 dimensional input vector, not the two input parameters I have (i.e. x and p).
As an alternative, I've also tried fitting using cftool and inputting the log-normal probability distribution function, but unfortunately I did not get a successful fit.
Any advice that you could give would be greatly appreciated.
Lewis
% create x data
x = (0.01:0.02:11);
% define lognormal distribution parameters
sigma=1;
mu=1;
% create a log normal distribution with these parameters
y = lognpdf(x,sigma,mu);
% plot the resulting distribution
figure, plot(x,y);
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Lognormal Distribution에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!