Table Of Contents

sign

Version:
    Last Modified: January 9, 2017

    Returns the sign of the input elements.

    Syntax

    c = sign(a)

    Inputs

    a

    Numeric scalar or numeric array of any dimension.

    Outputs

    c

    Sign of the elements in a. c is an array of the same size as a and, for real a, can return the following values: +1, 0, or -1. The sign of 0 is 0.

    Nonzero Complex Numbers

    For nonzero complex numbers, this function returns a complex value with the same phase as the input and with a magnitude of 1.

    A = [0, 2, -3]
    C = sign(A)

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: Not supported


    Recently Viewed Topics