Engee documentation

Create Diagonal Matrix

Creating a square diagonal matrix from the specified vector.

blockType: CreateDiagonalMatrix

Path in the library:

/Basic/Matrix Operations/Create Diagonal Matrix

Description

Block Create Diagonal Matrix fills in the diagonal of the output matrix on the elements contained in the vector lengths or a matrix of size on or on . The elements outside the diagonal are zero.

Ports

Input

# D — Input signal
vector | the matrix

Details

Input vector to convert to a diagonal matrix; vector lengths or a matrix of size on or on .

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, Int128, UInt8, UInt16, UInt32, UInt64, Uint128, Fixed, Bool

Complex numbers support

I don’t

Output

# A — output matrix
the matrix

Details

The Matrix on , where — the length of the input vector or the size of the input matrix ( on or on ).

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, Int128, UInt8, UInt16, UInt32, UInt64, Uint128, Fixed, Bool

Complex numbers support

I don’t

Additional options

C code generation: Yes