User`s guide
Identity Matrix
5-230
5Identity Matrix
Purpose 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 from input port 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.
y = eye([M N]) % Equivalent MATLAB code
When the Inherit input port attributes from input port 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.
100000
010000
001000