Table Of Contents

median

Version:
    Last Modified: January 9, 2017

    Computes the median value.

    Syntax

    c = median(a)
    c = median(a, b)

    Inputs

    a

    Scalar or array of any dimension. If a is not numeric, the output data type is the same as the input data type.

    b

    Dimension of a across which to compute the median. b can be in a range of 1 to the maximum supported array dimension (32). If you do not specify b, the function works with the first dimension whose size is not equal to 1. If the input data type is boolean, the number of elements along the corresponding dimension cannot be an even number.

    Outputs

    c

    Median of a. c is the same size as a except the size of the dimension specified in b is reduced to one.

    A = [1:1:15]
    C = median(A)

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: Not supported


    Recently Viewed Topics