Geoscience Reference
In-Depth Information
FaceColor: 'auto'
EdgeColor: [0 0 0]
listing the properties of the histogram. As an example we can access the bin
centers v and the frequency distribution n by typing
v = h.BinWidth * 0.5 + h.BinEdges(1:end-1)
n = h.Values
while the Figure Window is still active, which yields
v =
9.5000 10.5000 11.5000 12.5000 13.5000 14.5000
n =
2 6 13 20 15 4
Alternatively, we can use the bin edges e dei ned above to display the bar plot
of the frequency distribution n by typing
h = histogram(corg,e);
v = h.BinWidth * 0.5 + h.BinEdges(1:end-1)
n = h.Values
which yields
v =
Columns 1 through 4
9.7383 10.3814 11.0245 11.6676
Columns 5 through 8
12.3107 12.9537 13.5968 14.2399
n =
2 2 10 7 14 9 12 4
as well as the histogram plot, as shown in Figure 3.1 a. We can also use
the function histcount to determine n and e without plotting the histogram.
Typing
[n,e] = histcounts(corg,e)
v = diff(e(1:2)) * 0.5 + e(1:end-1)
yields
n =
2 2 10 7 14 9 12 4
e =
Columns 1 through 5
9.4168 10.0598 10.7029 11.3460 11.9891
Columns 6 through 9
12.6322 13.2753 13.9184 14.5615
Search WWH ::




Custom Search