In general I am using this command "splitapply" in order to find mean (average) of a group of data.
[N, edges, bin] = histcounts(B, edges);
mean_B=splitapply(@mean, B, bin)
But I would like to make a code that will :
1) Group my data into bins from edges : 1:0.5:10 (min=1, max=10 with step equal to 0.5)
2) Compute the means of the values in each bin (lets call it set1).
3) Group my data into bins from edges : 2:1:10 (min=2, max=10 with step equal to 1)
4) Compute the means of the values in each bin (set2).
5) Merge two sets of data
Could you please help me in order to make it?
Thanking you in advance