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

Cumulative sum for each of the matrix columns.

Pascal
function CumSum: TMtx; overload;

Calculate the cumulative sum for each of the calling matrix columns in-place.

var Mtx: Matrix; begin Mtx.Size(false,3,2,[1,2, 2,5, 3,1]); Mtx.CumSum; // Mtx becomes: // 1, 2 // 3, 7 // 6, 8 end;
Examples on GitHub
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!