I needed matlab code for cumulative sum of column vector
Show older comments
I needed matlab code for cumulative sum of column vector
Answers (1)
Azzi Abdelmalek
on 27 Dec 2014
Edited: Azzi Abdelmalek
on 27 Dec 2014
yourarray=[1 2 3 4 5]
out=cumsum(yourarray)
5 Comments
maha ismail
on 27 Dec 2014
Azzi Abdelmalek
on 27 Dec 2014
yourarray=[1 ;2; 3; 4; 5] % a column vector
out=cumsum(yourarray)
maha ismail
on 27 Dec 2014
maha ismail
on 27 Dec 2014
Azzi Abdelmalek
on 27 Dec 2014
Edited: Azzi Abdelmalek
on 27 Dec 2014
Maybe you need this
yourarray=[1 2 3;4 5 6]
out=cumsum(yourarray,1)
%or
yourarray=[1 2 3;4 5 6]
out=cumsum(yourarray,2)
Categories
Find more on Statistics and Machine Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!