I have the following code:
edges = SteppingRealTimesSec(:,1); counts = SteppingRealTimesSec(:,3); histogram('BinEdges',edges , 'BinCounts', counts)
This throws the error "Index exceeds matrix dimensions.". Even when substituting the following for edges and counts:
edges = [ 1 2 3 4 5 6];counts = [ 2 4 2 6 4];
Note that MATLAB states "For numeric histograms, the number of bins is length(edges)-1."
I have no idea why I keep receiving this error for such a simple case, can someone please help?
Best Answer