cumsum of a matrix
1 回表示 (過去 30 日間)
古いコメントを表示
Hi there I have a nxm matrix. I want to do the cumsum of each column, then all of them added up to give one total cumsum.
Any help?
0 件のコメント
回答 (2 件)
the cyclist
2012 年 5 月 25 日
Is this what you mean?
M = rand(5,6);
S = sum(cumsum(M),2);
1 件のコメント
Muhammad Furqan
2017 年 10 月 25 日
編集済み: Muhammad Furqan
2017 年 10 月 25 日
M = rand(5,6); Mean that it creates random numbers of a matrix with 5 column and 6 rows. S = sum(cumsum(M),2); It generate commulative sum of the rows in one column. For example M = rand(2,3);

S = sum(cumsum(M),2); 1.02263280043603 2.03657698954441
参考
カテゴリ
Help Center および File Exchange で Fourier Analysis and Filtering についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!