You are here: Symbol Reference > MtxExpr Namespace > Classes > Vector Record > public > GetCol Method > Vector.GetCol Method (TMtx, integer)
MtxVec VCL
ContentsIndex
PreviousUpNext
Vector.GetCol Method (TMtx, integer)

Copies a column from matrix.

Pascal
function GetCol(const Mtx: TMtx; aCol: integer): TVec; overload;

Copies the Col-th column from Mtx matrix to calling vector. The Length and Complex properties of calling vector are adjusted automatically. An exception is raised if condition checking is enabled and Col is greater than Mtx.Cols-1.

var a: Vector; b: Matrix; begin b.SetIt(2,2,False,[1,2, 3,4]); a.GetCol(b,0); // a now contains [1,3] end;
Examples on GitHub
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!