Engee documentation

Extract Diagonal

Extracting the main diagonal from the input matrix.

blockType: ExtractDiagonal

Path in the library:

/Basic/Matrix Operations/Extract Diagonal

Description

The Extract Diagonal block fills the output vector with the elements of the main diagonal of the input matrix A of size M by N.

Ports

Input

A - input signal
scalar | vector | matrix

The input matrix from which to extract the diagonal; scalar, vector or matrix.

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

Support for complex numbers: Yes

Output

D - vector of diagonal elements
vector

Output vector from diagonal elements of the input matrix.

The output vector has length min(M,N).

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

Additional options

C code generation: Yes