Code covered by the BSD License  

Highlights from
RCUMSUMC

Be the first to rate this file! 4 Downloads (last 30 days) File Size: 5.95 KB File ID: #28685
image thumbnail

RCUMSUMC

by Matt Fig

 

10 Sep 2010

RCUMSUM cumulative sum of elements, restarted after every zero.

| Watch this File

File Information
Description

 RCUMSUM cumulative sum of elements, restarted after every zero. For vectors, RCUMSUM(X) is a vector containing the cumulative sum of the elements of X, with the summation restarting after a zero is encountered. For matrices, RCUMSUM(X) is a matrix the same size as X containing the cumulative restarted sums over each column. For N-D arrays, RCUMSUM(X) operates along the first non-singleton dimension.
   
RCUMSUM(X,DIM) works along the dimension DIM.

Also included is RCUMPROD.

For bug reports, please email me.
Thanks

MATLAB release MATLAB 7.5 (R2007b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
cumsum Matt Fig 10 Sep 2010 12:35:46
cumprod Matt Fig 10 Sep 2010 12:35:46

Contact us at files@mathworks.com