dsp.Normalizer

(To be removed) Vector normalization along specified dimension

Description

The dsp.Normalizer System object™ performs vector normalization along rows, columns, or specified dimension.

To perform vector normalization:

  1. Create the dsp.Normalizer object and set its properties.

  2. Call the object with arguments, as if it were a function.

To learn more about how System objects work, see What Are System Objects? (MATLAB).

Creation

Description

example

norm = dsp.Normalizer returns a normalization System object, norm, that normalizes the input over each column by the squared 2-norm of the column plus a bias term of 1e-10 used to protect against divide-by-zero.

norm = dsp.Normalizer(Name,Value) returns a normalization object, norm, with each property set to the specified value.

Properties

expand all

Unless otherwise indicated, properties are nontunable, which means you cannot change their values after calling the object. Objects lock when you call them, and the release function unlocks them.

If a property is tunable, you can change its value at any time.

For more information on changing property values, see System Design in MATLAB Using System Objects (MATLAB).

Specify the type of normalization to perform as 2-norm or Squared 2-norm. The 2-norm mode supports floating-point signals only. The Squared 2-norm supports both fixed-point and floating-point signals.

Specify the real number to add in the denominator to avoid division by zero.

Tunable: Yes

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Specify whether to normalize along Column , Row, or Custom.

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.

Dependencies

This property applies when Dimension property is Custom.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Fixed-Point Properties

Specify the rounding method as one of Ceiling, Convergent, Floor , Nearest, Round, Simplest, or Zero.

Specify the overflow action as one of Wrap or Saturate.

Specify the product fixed-point data type as one of Same as input or Custom.

Specify the product fixed-point type as a scaled numerictype object with a Signedness of Auto.

Dependencies

This property applies when you set the ProductDataType property to Custom.

Specify the accumulator fixed-point data type as Same as product, Same as input, or Custom.

Specify the accumulator fixed-point type as a scaled numerictype object with a Signedness of Auto.

Dependencies

This property applies when you set the AccumulatorDataType property to Custom.

Specify the output fixed-point data type as Same as accumulator, Same as product , Same as input, or Custom.

Specify the output fixed-point type as a scaled numerictype object with a Signedness of Auto.

Dependencies

This property applies when you set the OutputDataType property to Custom.

Usage

Description

example

y = norm(x) returns a normalized output y.

Input Arguments

expand all

The input x must be floating-point for the 2-norm mode, and either fixed-point or floating-point for the Squared 2-norm mode.

The object also accepts variable-size inputs. Once the object is locked, you can change the size of each input channel.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | fi
Complex Number Support: Yes

Output Arguments

expand all

Normalizer output, returned as a vector or a matrix. The size, data type, and complexity of the output signal matches that of the input signal.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | fi
Complex Number Support: Yes

Object Functions

To use an object function, specify the System object as the first input argument. For example, to release system resources of a System object named obj, use this syntax:

release(obj)

expand all

stepRun System object algorithm
releaseRelease resources and allow changes to System object property values and input characteristics
resetReset internal states of System object

Examples

Normalize a Matrix

Note: If you are using R2016a or an earlier release, replace each call to the object with the equivalent step syntax. For example, obj(x) becomes step(obj,x).

norm = dsp.Normalizer;
x = magic(3);
y = norm(x)
y = 3×3

    0.0899    0.0093    0.0674
    0.0337    0.0467    0.0787
    0.0449    0.0841    0.0225

Algorithms

This object implements the algorithm, inputs, and outputs described on the Normalization block reference page. The object properties correspond to the block parameters, except:

  • Treat sample-based row input as column — The block allows you to input a row vector and normalize the row vector as a column vector. The normalization object always normalizes along the value of the Dimension property.

  • The normalization object does not support the Minimum and Maximum options for data output.

Compatibility Considerations

expand all

Warns starting in R2019a

Extended Capabilities

Introduced in R2012a