Cumulative sum
(Quaternion overloading of standard MATLAB® function)
Y = cumsum(X, dim)
cumsum(X) computes the cumulative sum of the quaternion argument. If the argument is a vector, the result is a vector. If the argument is a matrix, the cumulative sum is computed along the columns by default. As with the equivalent MATLAB® function, the dim parameter permits the sum to be computed along a specified dimension.