Average in interval histogram

Hello, I want calculate mean of each interval . Suppose interval is equal.

1 个评论

Try
X = rand(100,1);
[N,edges,bin] = histcounts( X );
mean_of_forth_bin = mean( X(bin==4) )
outputs
mean_of_forth_bin =
0.7103

请先登录,再进行评论。

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Data Distribution Plots 的更多信息

标签

提问:

2016-7-22

Community Treasure Hunt

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

Start Hunting!

Translated by