Category
Function
Constructs a histogram from input data and computes the median.
Syntax
histogram, median = Histogram(data, bins, min, max, out);
Inputs
Name | Type | Default | Description |
---|---|---|---|
data | scalar list or vector list or scalar field or vector field or series | none | field to be operated on |
bins | integer or vector | 256 for bytes, 100 otherwise | number of bins in histogram |
min | scalar or vector or field | min. of data | minimum value to operate on |
max | scalar or vector or field | max. of data | maximum value to operate on |
out | flag or vector | 0 | 0: exclude out-of-range values
1: include out-of-range values |
Outputs
Name | Type | Description |
---|---|---|
histogram | field or series | the histogram |
median | scalar | median of the input data |
Functional Details
The median is determined from an interpolation performed in the bin containing the median element (or elements, if there are an even number of samples).
data | is the data whose frequency distribution is to be computed and then represented in a histogram. data can consist of scalars, 2-vectors, or 3-vectors, with resulting one-dimensional, two-dimensional, or three-dimensional histograms, respectively. |
bins | specifies the number of bins into which the range from min to max will be divided. If data consists of vectors, then bins can be a vector of the same length specifying the number of bins in each dimension. |
min and max | specify the range of values for which the histogram is computed.
|
out | specifies whether the module ignores data values outside the range of min and max or includes them in the first and last bins respectively. If data consists of vectors, then out may be a vector of the same length specifying how to treat each dimension. |
Notes:
or
To see the results of Histogram for scalar data, pass its output to the Plot module. For 2-vector data, pass its output to the RubberSheet module with a scale factor of 1. For 3-vector data, use either the Isolate module or use Include followed by ShowBoundary.
Components
Creates new "positions," "connections," and "data" components. The data, representing the number of items in each bin, is connections dependent.
Example Visual Program
UsingEqualize.net SIMPLE/Histogram.net
See Also
[ OpenDX Home at IBM | OpenDX.org ]