Finds the modes (most common values) or estimated modes (most common range centers) of the input sequence X. This VI can perform unimodal or multimodal analysis. You must manually select the polymorphic instance to use.


icon

Select the Unimodal instance if you are sure that the input sequence X is unimodal or you expect one scalar mode result. Select the Multimodal instance if you expect an array of modes. If the VI does not find a mode, the Unimodal instance returns NaN without error and the Multimodal instance returns an empty array without error.

As defined in statistics, mode is the most frequently occurring value in a sequence of numbers. For example, for the data set (3, 7, 3, 9, 9, 3, 5, 1, 8, 5), the unique mode is 3. Similarly, for the data set (2, 4, 9, 6, 4, 6, 6, 2, 8, 2), two modes exist: 2 and 6. A distribution with a single mode is unimodal. A distribution with more than one mode is multimodal.

If you use the input sequence X = {0, 1, 3, 3, 4, 4, 4, 5, 5, 7} and set intervals to 1, the Mode VI calculates mode as 3.5 because 3.5 is the center value of the one interval intervals specifies. If you use the same input sequence for X and set intervals to 0, the Mode VI returns the exact mode 4.

Refer to the Histogram VI for more information about histograms.

Examples

Refer to the following example files included with LabVIEW.

  • labview\examples\Mathematics\Probability and Statistics\Statistics Solver.vi
  • labview\examples\Mathematics\Probability and Statistics\Noise Statistics.vi