Mode PtByPt VI

Owning Palette: Probability & Statistics PtByPt VIs

Requires: Full Development System

Finds the mode of the set of input data points specified by sample length 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.

This VI is similar to the Mode VI.

Note  By default, reentrant execution is enabled in all Point By Point VIs.

 Add to the block diagram  Find on the palette
initialize, when TRUE, initializes the internal state of the VI.
x is an input data point.
intervals must be greater than 0. 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 points specified by sample length. The Mode PtByPt VI scans h(x) for the interval i 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 from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster.