July 11th, 2006, 4:38 am
QuoteOriginally posted by: asdI have an array eg., x=[x1 ; x2 ; x3]I want to caculate running total arrayeg., y=[x1 ; x1+x2 ; x1+x2+x3]Can someone please suggest if there is some command or function to do this? (I am doing a loop now, and wondering if there is a better way)cumsum() is the function you're looking for.