DSP Blockset
  Go to block:
    Search    Help Desk 
Median    See Also

Find the median value of a vector input.

Library

Statistics, in Math Functions

Description

The Median block outputs the median value of the elements in a vector input.

For odd-length inputs, the block sorts the input elements by value, and outputs the central element of the sorted vector,

where s is the sorted vector and n=length(u). For even-length inputs, the block sorts the input elements by value, and outputs the average of the two central elements in the sorted vector.

A matrix input, u, is treated as a vector, u(:).

Note
If you expect to generate code for the Median block using the Real-Time Workshop, you should ensure that inputs are contiguous in memory. See the Contiguous Copy block for more information.

Dialog Box

See Also

Maximum
Mean
Minimum
Standard Deviation
Variance
median (MATLAB)


[ Previous | Help Desk | Next ]