フィルターのクリア

I needed matlab code for cumulative sum of column vector

1 回表示 (過去 30 日間)
maha ismail
maha ismail 2014 年 12 月 27 日
編集済み: Azzi Abdelmalek 2014 年 12 月 27 日
I needed matlab code for cumulative sum of column vector

回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 12 月 27 日
編集済み: Azzi Abdelmalek 2014 年 12 月 27 日
yourarray=[1 2 3 4 5]
out=cumsum(yourarray)
  5 件のコメント
maha ismail
maha ismail 2014 年 12 月 27 日
it doesn't work as I need I need to produce I column vector also not a scalar because I need cumulative sum for more colmun vector such that each row element of new column vector coming from current and previous element row of vectors
Azzi Abdelmalek
Azzi Abdelmalek 2014 年 12 月 27 日
編集済み: Azzi Abdelmalek 2014 年 12 月 27 日
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)

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by