/
Matrix__Draw_distribution___.html
50 lines (49 loc) · 2.01 KB
/
Matrix__Draw_distribution___.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<html><head><meta name="robots" content="index,follow">
<title>Matrix: Draw distribution...</title></head><body bgcolor="#FFFFFF">
<table border=0 cellpadding=0 cellspacing=0><tr><td bgcolor="#CCCC00"><table border=4 cellpadding=9><tr><td align=middle bgcolor="#000000"><font face="Palatino,Times" size=6 color="#999900"><b>
Matrix: Draw distribution...
</b></font></table></table>
<p>
A command to draw the distribution histogram of the values in the selected part of a <a href="Matrix.html">Matrix</a>.</p>
<h3>
Settings</h3>
<dl>
<dt>
<b>Horizontal range</b>, <b>Vertical range</b>
<dd>
determine the part of the matrix whose distribution will be drawn.
<dt>
<b>Minimum value</b>, <b>Maximum value</b>
<dd>
determine the range of values that will be considered in the distribution. To treat all bin widths equally, the range will include the <i>Minimum value</i> and exclude the <i>Maximum value</i> (see below).
<dt>
<b>Number of bins</b>
<dd>
determines the number of bars in the distribution histogram.
<dt>
<b>Minimum frequency</b>, <b>Maximum frequency</b>
<dd>
determine the limits of the vertical axis.
</dl>
<h3>
Algorithm</h3>
<p>
For a particular matrix element <i>z</i>, the histogram bin number <i>i</i> that will be incremented obeys the following relation:</p>
<table width="100%"><tr><td align=middle>
<i>lowerBinBorder</i><sub><i>i</sub></i> ≤ <i>z</i> < <i>lowerBinBorder</i><sub><i>i</sub></i>+ <i>binWidth</i>,</table>
<p>
where</p>
<table width="100%"><tr><td align=middle>
<i>binWidth</i> = (<i>maximumValue</i> - <i>minimumValue</i>)/<i>numberOfBins</i>,</table>
<p>
and</p>
<table width="100%"><tr><td align=middle>
<i>lowerBinBorder</i><sub><i>i</sub></i> = <i>minimumValue</i> + (<i>i</i> - 1)·<i>binWidth</i>.</table>
<p>
In this way all bins will be based on exactly the same width, as each binning interval includes its lower border and excludes its upper border (i.e., each interval is closed to the left and open to the right). </p>
<hr>
<address>
<p>© djmw, November 10, 2004</p>
</address>
</body>
</html>