Finds the mode of the input sequence X.
![]() |
X must contain at least one sample.
If X is empty, the histogram is undefined, the error returns through the Histogram VI, and the Mode VI sets mode to NaN.
If the following input sequence has a constant value, the Mode VI ignores the number of intervals and sets mode to the constant value in the input sequence: if X = a |
![]() |
The number of intervals must be greater than zero. The default is 1. If the number of intervals is less than or equal to zero, the histogram is undefined, the error returns through the Histogram VI, and the Mode VI sets mode to NaN. |
![]() |
mode is the value that occurs most often in a sequence of values.
For example, if the input sequence is
X = {0, 1, 3, 3, 4, 4, 4, 5, 5, 7}, then the mode of X is 4 because that is the value that most often occurs in X. The VI obtains mode by generating a discrete histogram h(x) with the specified number of intervals of the input sequence X and then scanning h(x) for the interval h(mode) = max[h(x)] Refer to the Histogram VI for more information. |
![]() |
error returns any error or warning condition from the VI. |