Issue with probability density function
3 次查看(过去 30 天)
显示 更早的评论
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'))
0 个评论
回答(1 个)
Torsten
2023-2-8
编辑:Torsten
2023-2-8
histogram(Output,'Normalization', 'pdf');
2 个评论
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 Center 和 File Exchange 中查找有关 Histograms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!