Triangular and diagonal indexing

版本 1.0.0.0 (6.3 KB) 作者: Bruno Luong
A collection of functions to index diagonal and triangular parts of the matrix
3.1K 次下载
更新时间 2009/3/22

查看许可证

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

引用格式

Bruno Luong (2025). Triangular and diagonal indexing (https://ww2.mathworks.cn/matlabcentral/fileexchange/23391-triangular-and-diagonal-indexing), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2006b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Operating on Diagonal Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0