Computes the norm of a vector.
The input vector.
This input accepts a 1D array of double-precision, floating point numbers or 1D array of complex double-precision, floating point numbers.
If this input is an empty array, this node returns NaN.
Type of norm this node computes.
If norm type is User Defined, this node uses user defined norm as the norm type.
Name | Value | Description |
---|---|---|
1-norm | 0 | Uses 1-norm. |
2-norm | 1 | Uses 2-norm. |
Inf-norm | 2 | Uses infinity-norm. |
-Inf-norm | 3 | Uses -infinity-norm. |
User Defined | 4 | Uses the user defined norm as the norm type. |
Algorithms for Calculating the Norm
This node calculates the norm according to the following equations.
Norm type | Algorithm |
---|---|
1-norm | $\Vert x\Vert =\left|{x}_{0}\right|+\left|{x}_{1}\right|+\mathrm{...}+\left|{x}_{n-1}\right|$ |
2-norm | $\Vert x\Vert =\sqrt{({\left|{x}_{0}\right|}^{2}+{\left|{x}_{1}\right|}^{2}+\mathrm{...}+{\left|{x}_{n-1}\right|}^{2})}$ |
Inf-norm | $\Vert x\Vert ={\mathrm{max}}_{i}\left(\right|{x}_{i}\left|\right)$ |
-Inf-norm | $\Vert x\Vert ={\mathrm{min}}_{i}\left(\right|{x}_{i}\left|\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
Default: 2-norm
Norm type that you specify.
If norm type is User Defined, this node uses user defined norm as the norm type.
This input must be nonzero.
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
The norm of the input vector.
Error information.
The node produces this output 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.
Where This Node Can Run:
Desktop OS: Windows
FPGA: This product does not support FPGA devices