next up previous contents index
suivant: Multiplication of elements of monter: Arithmetic and matrix précédent: Addition of elements of   Table des matières   Index


Cumulated sum of elements of each column of a matrix : cumSum

cumSum takes as argument a matrix A.
cumSum returns the matrix whose columns are the cumulated sum of the elements of the corresponding column of the matrix A.
Input :
cumSum([[1,2],[3,4],[5,6]])
Output :
[[1,2],[4,6],[9,12]]
since the cumulated sum are : 1, 1+3=4, 1+3+5=9 and 2, 2+4=6, 2+4+6=12.



giac documentation written by Renée De Graeve and Bernard Parisse