Finds the norm of the Input Vector and obtains its corresponding Unit Vector by normalizing the original Input Vector with its norm.


icon

Inputs/Outputs

  • c1dcdb.png Input Vector

    Input Vector is the input vector. If Input Vector is an empty array, Unit Vector is also an empty array, and norm is NaN.

  • cu16.png norm type

    norm type indicates what type of norm you use to compute the norm. The default is 2-norm. If norm type is User Defined, this VI uses user defined norm as the norm type.

    11-norm
    22-norm (default)
    3Inf-norm
    4–Inf-norm
    5User Defined
  • cdbl.png user defined norm

    user defined norm is the user defined norm type. The default is –1. This VI uses user defined norm as the norm type only if you set norm type to User Defined.

    user defined norm must be nonzero.

  • i1dcdb.png Unit Vector

    Unit Vector is the output, normalized vector.

  • idbl.png norm

    norm is the norm of Input Vector.

  • ii32.png error

    error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster.

  • This VI calculates norm using the following equations.

    1-norm ||X|| = |x0| + |x1| + … + |xn – 1|
    2-norm ||X|| = √(|x0|² + |x1|² + … + |xn – 1|²)
    Inf-norm ||X|| = maxi(|xi|)
    –Inf-norm ||X|| = mini(|xi|)
    User Defined ||X|| = ||x0|y + |x1|y + … + |xn – 1|y|1/y

    where X is Input Vector, y is user defined norm, and ||X|| is norm.

    This VI calculates Unit Vector using the following equation:

    where U is Unit Vector.