Main Content

wrev

    Description

    y = wrev(x) reverses the vector x.

    example

    Examples

    collapse all

    Create a vector.

    v = [1 2 3 4 5];

    Flip the vector.

    wrev(v)
    ans = 1×5
    
         5     4     3     2     1
    
    

    Flip the transpose of the vector.

    wrev(v')
    ans = 5×1
    
         5
         4
         3
         2
         1
    
    

    Input Arguments

    collapse all

    Input, specified as a vector.

    Data Types: single | double
    Complex Number Support: Yes

    Version History

    Introduced before R2006a

    See Also

    |