0

I want to change how data are distributed in the histogram that I built.My histogram looks like

enter image description here

But I want it to look like

enter image description here

I set

bins1=[10,30,50,70];
hist(data,bins1) 

How can I arrange the bins as in the second figure?

sam_rox
  • 739
  • 3
  • 14
  • 29

1 Answers1

3

Use histc instead of hist. histc allows you to define the edges while hist uses the second input parameter as centers.

Daniel
  • 36,610
  • 3
  • 36
  • 69