Thursday 15 March 2012

matlab histogram with same x axis, but reasonable number of bins -


I want to attract several histograms with the following properties.

The data of each histogram is different and there are different categories.

Each histogram should have the same range from 0-10000 to the x-axis.

For each histogram, the data range can not be from 0-10000, but it can be equal to 0-2500 or any other number less than or equal to zero, and the maximum is equal to or equal to 10000

For each histogram, I need 10 bins in the range of interest (for example, 10 bins between 0-2500).

Is there a method that does this? Or should I apply it on my own?

Why not only use hist () for data and < For example:

set () to set your axes to (0,10000)

  Mymean = 2000; Mystd = 200; A = random ('normal', mymean, mystd, 1000,1); Hist (a, 10); Set (GCA, 'Eclim', [0 10000])    

No comments:

Post a Comment