`p=cumsum(x)`

Inputs | |

`x` |
A two-dimensional array of real of complex numbers. |

Outputs | |

`p` |
A two-dimensional array of of the same size as the input. |

The cumulative sum of an element in a two-dimensional array is defined to be the sum of all the elements before it in its colum and itself.

The cumulative sum of an element in a row is defined to be the sum of all the elements before it in the row and itself.

`cumsum`

returns an array of the same size as the input, and
each element of the output array is the cumulative sum of
corresponding element of the input array.