You are here: Symbol Reference > MtxExprInt Namespace > Classes > MatrixInt Record > public > MatrixInt.UpperTriangle Method
MtxVec VCL
ContentsIndex
PreviousUpNext
MatrixInt.UpperTriangle Method

Constructs upper triangular matrix.

Pascal
function UpperTriangle(const Mtx: TMtxInt; ZeroLower: boolean; Diagonal: boolean): TMtxInt; overload;

The method uses Mtx matrix to construct an upper triangular matrix. The results are stored in the calling matrix. If the ZeroLower parameter is true then the calling matrix subdiagonal elements will be set to zero - otherwise the subdiagonal elements will not be initialized. If the Diagonal boolean parameter is true then the Mtx matrix main diagonal elements will be copied to the calling matrix main diagonal elements. If the Diagonal parameter is false, the calling matrix main diagonal elements will be set to zero.

var A,B: TMtxInt; begin CreateIt(A,B); A.SetIt(2,1,[1,2, 2,4]); // 2x2, not complex matrix B.UpperTriangle(A,True,True); // B becomes: // [1,2, // [0,4] FreeIt(A,B); end;
Examples on GitHub
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!