Color Burr distribution function line

27 visualizaciones (últimos 30 días)
nirvana316
nirvana316 el 1 de Nov. de 2024 a las 11:31
Comentada: nirvana316 el 1 de Nov. de 2024 a las 15:10
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)

Respuesta aceptada

Torsten
Torsten el 1 de Nov. de 2024 a las 13:52
Editada: Torsten el 1 de Nov. de 2024 a las 14:11
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 comentario
nirvana316
nirvana316 el 1 de Nov. de 2024 a las 15:10
Thank you this does exactly what I want

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Histograms en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by