Mode PtByPt (Not in Base Package)

Finds the mode of the set of input data by computing the histogram of the input values and selecting the largest bin. The mode is the center value of the bin with the largest count.

initialize, when TRUE, initializes the internal state of the VI.
input data is a set of input data.
intervals must be greater than zero. The default is 1.
sample length is the length of each set of incoming data. The VI performs computation for each set of data. The default is 100. sample length must be greater than zero.
mode is the value that occurs most often in a set of input values. For example, if the input sequence is

{0, 1, 3, 3, 4, 4, 4, 5, 5, 7},

then the mode is 4 because 4 occurs most often in the sequence.

The Mode PtByPt VI finds mode with the aid of a histogram and according to the equation h(mode) = max[h(x)]. The Mode PtByPt VI generates a discrete histogram, h(x), with the specified number of intervals of the set of input data. The Mode PtByPt VI scans h(x) for the interval that has the maximum count. After the Mode PtByPt VI identifies the interval, it selects the center value of the interval as the mode of the set of input data. Refer to the Histogram PtByPt VI for more information about point-by-point histograms.

error returns any error or warning condition from the VI. Refer to Point By Point Error Codes for more information about these conditions.