Color Burr distribution function line

조회 수: 14 (최근 30일)
nirvana316
nirvana316 2024년 11월 1일
댓글: nirvana316 2024년 11월 1일
I create a histogram and I want to include a fitting line around the data. I used a Burr distribution fitting line which matches well. However, when I plot this I am only able to plot "pd" which includes both the histogram data and the fit line. I cannot then find way to change the line color or width of the fit line since pd has both data in it.
Code line is:
pd = fitdist(X,'Burr')
plot(pd)

채택된 답변

Torsten
Torsten 2024년 11월 1일
편집: Torsten 2024년 11월 1일
pd = makedist('Burr','alpha',1,'c',2,'k',5);
R = random(pd,100,1);
pd = fitdist(R,'Burr');
figure(1)
plot(pd)
x = 0:0.01:2;
figure(2)
hold on
histogram(R,'Normalization','pdf')
plot(x,pdf(pd,x),'Color','g','LineWidth',3)
xlabel('Data')
ylabel('PDF')
  댓글 수: 1
nirvana316
nirvana316 2024년 11월 1일
Thank you this does exactly what I want

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Histograms에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by