Table Of Contents

Unit Vector (G Dataflow)

Version:
    Last Modified: January 9, 2017

    Finds the norm of a vector and normalizes the vector with the norm.

    connector_pane_image
    datatype_icon

    input vector

    Input vector.

    This input can be an array of double-precision floating-point numbers or an array of complex double-precision floating-point numbers.

    If input vector is an empty array, unit vector is also an empty array, and norm is NaN.

    datatype_icon

    norm type

    Type of norm this node uses to compute the norm.

    Name Value Description
    1-norm 1 Uses 1-norm.
    2-norm 2 Uses 2-norm.
    Inf-norm 3 Uses infinity-norm.
    -Inf-norm 4 Uses -infinity-norm.
    User Defined 5 Uses user defined norm as the norm type.

    Algorithm for Calculating norm with Each norm type

    This node calculates norm using the following equations:

    1-norm

    x = | x 0 | + | x 1 | + + | x n 1 |

    2-norm

    x = ( | x 0 | 2 + | x 1 | 2 + + | x n 1 | 2 )

    Inf-norm

    x = max i ( | x i | )

    -Inf-norm

    x = min i ( | x i | )

    User Defined

    x = ( | x 0 | y + | x 1 | y + + | x n 1 | y ) 1 y

    where

    • x is input vector
    • y is user defined norm
    • ||x|| is norm

    Default: 2-norm

    datatype_icon

    user defined norm

    User-defined norm type.

    This node uses user defined norm as the norm type only if you set norm type to User Defined. user defined norm must be nonzero.

    Default: -1

    datatype_icon

    error in

    Error conditions that occur before this node runs. The node responds to this input according to standard error behavior.

    Default: No error

    datatype_icon

    unit vector

    Output normalized vector.

    datatype_icon

    norm

    Norm of the input vector.

    datatype_icon

    error out

    Error information. The node produces this output according to standard error behavior.

    Algorithm for Calculating unit vector

    This node calculates unit vector using the following equation:

    U = X X

    where U is unit vector.

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: Not supported


    Recently Viewed Topics