Issue with probability density function

조회 수: 3 (최근 30일)
Turbulence Analysis
Turbulence Analysis 2023년 2월 8일
댓글: Torsten 2023년 2월 8일
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'))

답변 (1개)

Torsten
Torsten 2023년 2월 8일
편집: Torsten 2023년 2월 8일
histogram(Output,'Normalization', 'pdf');
  댓글 수: 2
Turbulence Analysis
Turbulence Analysis 2023년 2월 8일
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 2023년 2월 8일
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

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

카테고리

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