Average in interval histogram

4 views (last 30 days)
Dani D
Dani D on 22 Jul 2016
Commented: per isakson on 22 Jul 2016
Hello, I want calculate mean of each interval . Suppose interval is equal.
  1 Comment
per isakson
per isakson on 22 Jul 2016
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

Sign in to comment.

Answers (0)

Categories

Find more on Data Distribution Plots in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!