Version:

Last Modified: March 15, 2017

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

Input vector.

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

This input changes to **input data point** when the data type is a double-precision, floating-point number.

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

Input data points.

This input changes to **input vector** when the data type is a 1D array of double-precision, floating-point numbers or an array of complex double-precision, floating-point numbers.

Type of norm this node uses to compute the norm.

This input is available only if you wire an array of double-precision, floating-point numbers or an array of complex double-precision, floating-point numbers to **input vector**.

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 |
$\Vert x\Vert =\left|{x}_{0}\right|+\left|{x}_{1}\right|+\dots +\left|{x}_{n-1}\right|$ |

2-norm |
$\Vert x\Vert =\surd ({\left|{x}_{0}\right|}^{2}+{\left|{x}_{1}\right|}^{2}+\dots +{\left|{x}_{n-1}\right|}^{2})$ |

Inf-norm |
$\Vert x\Vert ={\mathrm{max}}_{i}\left(\left|{x}_{i}\right|\right)$ |

-Inf-norm |
$\Vert x\Vert ={\mathrm{min}}_{i}\left(\left|{x}_{i}\right|\right)$ |

User Defined |
$\Vert x\Vert ={({\left|{x}_{0}\right|}^{y}+{\left|{x}_{1}\right|}^{y}+\dots +{\left|{x}_{n-1}\right|}^{y})}^{\frac{1}{y}}$ |

where

*x*is**input vector***y*is**user defined norm**- ||
*x*|| is**norm**

**Default: **2-norm

Length of each set of data.

The node performs computation for each set of data. **sample length** must be greater than zero.

This input is available only if you wire a double-precision, floating-point number to **input vector**.

**Default: **100

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.

This input is available only if you wire an array of double-precision, floating-point numbers or an array of complex double-precision, floating-point numbers to **input vector**.

**Default: **-1

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an **error in** input and an **error out** output so that the node can respond to and communicate errors that occur while code is running. The value of **error in** specifies whether an error occurred before the node runs. Most nodes respond to values of **error in** in a standard, predictable way.

**Default: **No error

Output normalized vector.

This output can return an array of double-precision, floating-point numbers or an array of complex double-precision, floating-point numbers.

Norm of the input vector.

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

**error in** input and an **error out** output so that the node can respond to and communicate errors that occur while code is running. The value of **error in** specifies whether an error occurred before the node runs. Most nodes respond to values of **error in** in a standard, predictable way.

This node calculates **unit vector** using the following equation:

$U=\frac{X}{\Vert X\Vert}$

where *U* is **unit vector**.

**Where This Node Can Run: **

Desktop OS: Windows

FPGA: This product does not support FPGA devices