DSP Blockset    
Identity Matrix

Generate a matrix with ones on the main diagonal and zeros elsewhere.

Library
DSP Sources,

Math Functions / Matrices and Linear Algebra / Matrix Operations

Description

The Identity Matrix block generates a rectangular matrix with ones on the main diagonal and zeros elsewhere.

When the Inherit input port attributes check box is selected, the input port is enabled, and an M-by-N matrix input generates a sample-based M-by-N matrix output with the same sample period. The values in the input matrix are ignored.

When the Inherit input port attributes check box is not selected, the input port is disabled, and the dimensions of the output matrix are determined by the Matrix size parameter. A scalar value, M, specifies an M-by-M identity matrix, while a two-element vector, [M N], specifies an M-by-N unit-diagonal matrix. The output is sample-based, and has the sample period specified by the Sample time parameter.

Example

Set Matrix size to [3 6] to generate the 3-by-6 unit-diagonal matrix below.

Dialog Box

Inherit input port attributes
Enables the input port when selected. The output inherits its dimensions and sample period from the input.
Matrix size
The number of rows and columns in the output matrix: a scalar M for a square M-by-M output, or a vector [M N] for an M-by-N output. This parameter is disabled when Inherit input port attributes is selected.
Sample time
The discrete sample period of the output. This parameter is disabled when Inherit input port attributes is selected.

See Also

Constant Diagonal Matrix
DSP Blockset
DSP Constant
DSP Blockset
eye
MATLAB

See Creating Signals Using Constant Blocks for related information.


 IDCT IFFT