You are here: Symbol Reference > MtxExpr Namespace > Classes > Matrix Record > public > Matrix.RowExchange Method
MtxVec VCL
ContentsIndex
PreviousUpNext
Matrix.RowExchange Method

Exchanges two matrix rows.

Pascal
function RowExchange(i: integer; j: integer): TMtx; overload;

Exchange the i-th and j-th rows of the calling matrix in-place. An exception is raised if matrix bounds are overrun. The indexes i and j are zero based. (the first row has Index 0).

var A,B: Matrix; begin A.SetIt(2,2,False,[1,3, 2,4]); B.RowExchange(0,1); // B becomes: // [2,4, // 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!