short way to bar plot a discretize vector?
4 Ansichten (letzte 30 Tage)
I want to take a vector A, and bar plot it using specific bins (defiend by 'edges' vector). I want the plot to show the sum of values that belong to each bin. Not the number of values like histogram does.
I started to write a code:
for i=length(edges) %this part creates cell array that holds all the sum of values that fall in the bins.
but I thought maybe there is shorter way to do it. I would love to know about it, like turn an option in the histogram() comamnd to show the sum of values that fell into the bin rather then the counts (number of values). :)