General Histogram VI
- Updated2024-11-20
- 5 minute(s) read
Finds the discrete histogram of the input sequence X. This VI is functionally and connector pane compatible with the Advanced Analysis Library General Histogram VI. If you have the Advanced Analysis Library, you may wish to use that version of VI as it executes approximately 6 times faster. The bins of the histogram are determined as follows: The input Bins is an array of clusters where each cluster defines the range of values for a bin. The elements of the cluster are lower, upper, and inclusion. The elements lower and upper specify the boundaries of the bin. The element inclusion specifies how the boundaries are treated. Choosing 'lower' causes the lower boundary to be part of the bin but not the upper boundary. Choosing 'upper' is exactly opposite. Both boundaries can be included by choosing 'both'. If no bin specifications are provided in the input Bins, the inputs max, min, no. bins, and inclusion will be used to specify a set of uniformly spaced bins. If the inputs max and min are left unwired, the maximum and minimum values in the input sequence X will be used. If no. bins is left unwired, the number of bins will be determined according to Sturges' Rule ( number of bins=1 + 3.3log(sizeof(X)) ). The centers of each bin are set according to the following equation and returned in the output array Axis: center[i] = (lower + upper)/2. The output cluster no. outside contains three elements: total, above, and below. Upon succesful execution, the element total will contain the total number of points in X not falling in a bin. The elements 'above' and 'below' will have meaning only if Bins are specified such that Bin[0].upper =< Bin[1].lower < Bin[1].upper, etc. In this case, 'below' represents the number of values below Bin[0].lower and 'above' represents the number of values in X above Bin[#bins-1].upper.

Inputs/Outputs
X
—
bins
—
bins specifies the boundaries of each bin of the histogram. The input bins is an array of clusters where each cluster defines the range of values for a bin. The cluster includes the following elements. If no bin specifications are provided in the input bins, the inputs max, min, # bins, and inclusion will be used to specify a set of uniformly spaced bins.
max
—
(DBL) - specifies the maximum value to include in the histogram. If min and max are unwired (min = max = 0.0), the VI will use the maximum and minimum values in the input array X.
min
—
(DBL) - specifies the minimum value to include in the histogram. If min and max are unwired (min = max = 0.0), the VI will use the maximum and minimum values in the input array X.
# bins
—
(I32) - specifies the number of bins in the histogram. If left unwired (#bins = 0, by default), the number of bins is determined by Sturges' Rule: number of bins = 1 + 3.3log(length of X).
inclusion
—
specifies how the boundaries of each bin are handled. 0: include the lower boundary 1: include the upper boundary 2: include both boundaries. The max and min boundaries are included with the max and min bins. By default, the lower boundary is included.
histogram
—
histogram returns the histogram.
axis
—
axis returns the center values for each bin of histogram. The centers of each bin are set according to the following equation and returned in the output array axis.
# outside
—
# outside is the output cluster. # outside contains three elements:
error
—
No errors are returned. This output maintains compatibility with the Advanced Analysis Library General Histogram VI. |
X
—
bins
—
lower
—
inclusion
—
histogram
—
axis
—

# outside
—
total
—