Triangular and diagonal indexing

A collection of functions to index diagonal and triangular parts of the matrix
3,1K Downloads
Aktualisiert 22 Mär 2009

Lizenz anzeigen

For a symmetric matrix A, A(:) (full "vectorization") contains more information than is strictly necessary, since the matrix is completely determined by the symmetry together with the lower triangular portion, that is, the n(n+1)/2 entries on and below the main diagonal. The half-vectorization, built as following with the package:
> A(itril(size(A))),
of a symmetric n×n matrix A is the n(n+1)/2 × 1 column vector obtained by "vectorizing" only the lower triangular part of A.

This package provides functions for conveniently indexing the triangular parts (both lower and upper) parst as well as the diagonals of the matrix.

It also provides the so called Duplication and Elimination matrices which is used to convert between full and half-vectorization of the matrix.

The output indices are useful for programmers who wish to manipulate directly the triangular parts without calling built-in functions such as TRIU, TRIL and DIAG

Zitieren als

Bruno Luong (2024). Triangular and diagonal indexing (https://www.mathworks.com/matlabcentral/fileexchange/23391-triangular-and-diagonal-indexing), MATLAB Central File Exchange. Abgerufen .

Kompatibilität der MATLAB-Version
Erstellt mit R2006b
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Operating on Diagonal Matrices finden Sie in Help Center und MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Veröffentlicht Versionshinweise
1.0.0.0