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

Sorts the elements in a matrix row(s) in descending order.

Pascal
function SortDescend: TMtx; overload;

Sorts the elements in calling matrix row(s) in descending order in-place. If the calling matrix is complex, then complex values are first compared by the absolute value and then by the argument.

Each row is sorted independently from the other.

var A: Matrix; begin A.SetIt(2,2,False,[1,2, 4,2]); A.SortDescend; // A becomes: // [2,1] // [4,2] end;
Examples on GitHub
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!