| Signal Processing Blockset™ | ![]() |
Perform vector normalization along rows, columns, or specified dimension
Math Functions / Math Operations
dspmathops
The Normalization block independently normalizes each row, column, or vector of the specified dimension of the input. The Normalization block accepts real and complex inputs. The block only accepts floating-point signals for the 2-norm mode, and both fixed-point and floating-point signals for the squared 2-norm mode. The output always has the same dimensions and frame status as the input.
This block treats an arbitrarily dimensioned input U as a collection of vectors oriented along the specified dimension. The block normalizes these vectors by either their norm or the square of their norm.
For example, consider a 3-dimensional input U(i,j,k) and assume that you want to normalize along the second dimension. First, define the 2-dimensional intermediate quantity V(i,k) such that each element of V is the norm of one of the vectors in U:

Given V, the output of the block Y(i, j,k) in 2-norm mode is
![]()
In squared 2-norm mode, the block output is
![]()
The normalization bias, b, is typically chosen to be a small positive constant (for example, 1e-10) that prevents potential division by zero.
The following diagram shows the data types used within the Normalization block for fixed-point signals (squared 2-norm mode only).

The output of the multiplier is in the product output data type when the input is real. When the input is complex, the result of the multiplication is in the accumulator data type. For details on the complex multiplication performed, see Multiplication Data Types. You can set the accumulator, product output, and output data types in the block dialog as discussed in Dialog Box.
The Main pane of the Normalization dialog appears as follows.

Specify the type of normalization to perform, 2-norm or Squared 2-norm. 2-norm mode supports floating-point signals only. Squared 2-norm supports both fixed-point and floating-point signals.
Specify the real value b to be added in the denominator to avoid division by zero. Tunable.
Specify whether to normalize along rows, columns, or the dimension specified in the Dimension parameter.
Specify the one-based value of the dimension over which to normalize. The value of this parameter cannot exceed the number of dimensions in the input signal. This parameter is only visible if Specified dimension is selected for the Normalize over parameter.
Select to treat a sample-based row input as a column.
The Fixed-Point pane of the Normalization dialog appears as follows.

Note The parameters on this pane are only applicable to fixed-point signals when the block is in squared 2-norm mode. See Fixed-Point Data Types for a diagram of how the product output, accumulator, and output data types are used in this case. |
Select the rounding mode for fixed-point operations.
Select the overflow mode for fixed-point operations.
Use this parameter to specify how you would like to designate the product output word and fraction lengths:
When you select Same as input, these characteristics match those of the input to the block.
When you select Binary point scaling, you can enter the word length and the fraction length of the product output, in bits.
When you select Slope and bias scaling, you can enter the word length, in bits, and the slope of the product output. This block requires power-of-two slope and a bias of zero.
Use this parameter to specify the accumulator word and fraction lengths resulting from a complex-complex multiplication in the block. The bias b is also quantized into the accumulator data type:
When you select Same as product output, these characteristics match those of the product output.
When you select Same as input, these characteristics match those of the input to the block.
When you select Binary point scaling, you can enter the word length and the fraction length of the accumulator, in bits.
When you select Slope and bias scaling, you can enter the word length, in bits, and the slope of the accumulator. This block requires power-of-two slope and a bias of zero.
Choose how you specify the output word length and fraction length:
When you select Same as accumulator, these characteristics match those of the accumulator.
When you select Same as product output, these characteristics match those of the product output.
When you select Same as input, these characteristics match those of the input to the block.
When you select Binary point scaling, you can enter the word length and the fraction length of the output, in bits.
When you select Slope and bias scaling, you can enter the word length, in bits, and the slope of the output. This block requires power-of-two slope and a bias of zero.
Select this parameter to prevent any fixed-point scaling you specify in this block mask from being overridden by the autoscaling feature of the Fixed-Point Tool. See the fxptdlg reference page for more information.
| Port | Supported Data Types |
|---|---|
Input |
|
Output |
|
| Array-Vector Multiply | Signal Processing Blockset |
| Reciprocal Condition | Signal Processing Blockset |
| norm | MATLAB |
![]() | NCO | Nyquist Filter | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |