Identity Matrix
Creation of a unit matrix.
Description
The Identity Matrix block outputs a unit matrix. The block generates a square or rectangular matrix with elements of the main diagonal equal to one and other elements equal to zero.
Ports
Input
Port_1 - input signal
scalar
| vector
| matrix
Input signal that specifies the dimensions of the output matrix; scalar, vector or matrix. If the input signal is an M by N matrix, the block generates an M by N output matrix with the same sampling period as the input matrix. The values of the input matrix elements are ignored.
Data types: Float64
, Float32
, Float16
, Int8
, UInt8
, Int16
, UInt16
, Int32
, UInt32
, Int64
, UInt64
, Int128
, UInt128
Bool
, Fixed
.
Support for complex numbers: Yes
Parameters
Inherit output port attributes from input port - inherit output port attributes from input port
disabled (by default)
| enabled
If the Inherit output port attributes from input port parameter is enabled, the size, type of elements and calculation step for the output matrix are determined by the same attributes of the input port. Other parameters are ignored.
If the Inherit output port attributes from input port parameter is disabled, the block behaviour depends on the values of the Output dimensions, Output data type and Sample time parameters.
Output dimensions - output matrix size
(5, 5) (by default)
| cortex
Number of rows and columns in the output matrix. Possible values:
-
(N, M)
- a unit matrix of size N by M is output.
-
(N,)
- outputs a vecor of length N.
-
()
(empty tuple) - outputs scalar value1
(size ()).
Output data type - output data type
Float64
| Float32
| Float16
| Int8
| UInt8
| Int16
| UInt16
| UInt16
| Int32
| UInt32
| UInt32
| UInt32
| Int64
| UInt64
| Int128
| UInt128
| Bool
| Fixed-point
Specify the type of output data for this block.
Output fixed-point type - output type of fixed-point numbers
Fixed{Int16, 0} (By default)
| description of fixed-point data type
Specify the output type of fixed-point numbers.
Dependencies
Enabled when the Output data type parameter is set to Fixed-point
.
Block parameter |
|
Value |
|
By default |
|
Sample time - interval between calculation steps
1 (by default)
| scalar
Interval between calculation steps (non-negative number). To inherit a calculation step, set this parameter to -1
.