Info

此问题已关闭。 请重新打开它进行编辑或回答。

A question about the histograms please

3 次查看(过去 30 天)
MAHMOUD ALZIOUD
MAHMOUD ALZIOUD 2017-12-14
关闭: MATLAB Answer Bot 2021-8-20
Hi everyone, As can be seen in the attached image, my histogram is built using counts, I WROTE THE FOLLOWING CODE TO CONVERT COUNTS TO %, how can i know exactly the percent of each load bin
figure,
>> histogram([tandem{K}]);
ylabels = get(gca, 'YTickLabel');
ylabels = linspace(0,100,length(ylabels));
set(gca,'YTickLabel',ylabels);

回答(1 个)

the cyclist
the cyclist 2017-12-14
编辑:the cyclist 2017-12-14
As described in the documentation for the histogram function, you can used the 'Normalization' input parameter:
histogram(tandem{K},nbins,'Normalization','probability')
  13 个评论
Image Analyst
Image Analyst 2017-12-14
Is your data in the range 0 to 80, or 0 to 80,000? Either way, just use linspace and put in the overall min and overall max, and the number of bins you want to form the edges.
MAHMOUD ALZIOUD
MAHMOUD ALZIOUD 2017-12-14
thank you guys for your very powerful help

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by