Issue with probability density function

2 visualizaciones (últimos 30 días)
Turbulence Analysis
Turbulence Analysis el 8 de Feb. de 2023
Comentada: Torsten el 8 de Feb. de 2023
Hi,
I am trying to plot the histogram along with pdf. I am already having the script for histogram, could someone please help me to implement pdf in the below script.
histogram(Output,'Normalization', 'probability','FaceColor','black');
saveas(gcf, sprintf('Histogram.bmp'))
savefig(gcf, sprintf('Histogram'))

Respuestas (1)

Torsten
Torsten el 8 de Feb. de 2023
Editada: Torsten el 8 de Feb. de 2023
histogram(Output,'Normalization', 'pdf');
  2 comentarios
Turbulence Analysis
Turbulence Analysis el 8 de Feb. de 2023
Hi,
With this I am just getting only histograms again. Actually, I would like to plot the histogram and distribution on the same plot.
Torsten
Torsten el 8 de Feb. de 2023
The empirical distribution is what you get from the above command.
In order to get a proper distribution curve, you will have to tell MATLAB which underlying distribution your measurement data follow and determine the parameters of this distribution (e.g. using MATLAB's "mle").
Look at the example
Determine Underlying Probability Distribution
under

Iniciar sesión para comentar.

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by