Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Extract Triangular Matrix

Extract lower or upper triangle from input matrices

Library

Math Functions / Matrices and Linear Algebra / Matrix Operations

dspmtrx3

Description

The Extract Triangular Matrix block creates a triangular matrix output from the upper or lower triangular elements of an M-by-N input matrix. The block treats length-M unoriented vector inputs as an M-by-1 matrix.

The Extract parameter selects between the two components of the input:

  • Upper — Copies the elements on and above the main diagonal of the input matrix to an output matrix of the same size. The first row of the output matrix is therefore identical to the first row of the input matrix. The elements below the main diagonal of the output matrix are zero.

  • Lower — Copies the elements on and below the main diagonal of the input matrix to an output matrix of the same size. The first column of the output matrix is therefore identical to the first column of the input matrix. The elements above the main diagonal of the output matrix are zero.

Examples

The ex_extracttriang_ref model below shows the extraction of upper and lower triangles from a 5-by-3 input matrix.

Parameters

Extract

The component of the matrix to copy to the output: upper triangle or lower triangle.

Supported Data Types

PortSupported Data Types

A

  • Double-precision floating point

  • Single-precision floating point

  • Fixed point (signed and unsigned)

  • Boolean

  • 8-, 16-, and 32-bit signed integers

  • 8-, 16-, and 32-bit unsigned integers

U

  • Double-precision floating point

  • Single-precision floating point

  • Fixed point (signed and unsigned)

  • Boolean

  • 8-, 16-, and 32-bit signed integers

  • 8-, 16-, and 32-bit unsigned integers

L

  • Double-precision floating point

  • Single-precision floating point

  • Fixed point (signed and unsigned)

  • Boolean

  • 8-, 16-, and 32-bit signed integers

  • 8-, 16-, and 32-bit unsigned integers

See Also

Autocorrelation LPCDSP System Toolbox
Cholesky FactorizationDSP System Toolbox
Extract DiagonalDSP System Toolbox
Forward SubstitutionDSP System Toolbox
LDL FactorizationDSP System Toolbox
LU FactorizationDSP System Toolbox
trilMATLAB
triuMATLAB

Introduced before R2006a

Was this topic helpful?