フィルターのクリア

sum in matrix

1 回表示 (過去 30 日間)
rami
rami 2012 年 2 月 2 日
Hi if i have x matrix from 1 to i have many different value and i want creat a new matrix y where
y(1)=x(1)
y(2)=x(1)+x(2)
y(3)=x(1)+x(2)+x(3)
y(i)=x(1)+...+x(i)
how i can make it thx

採用された回答

James Tursa
James Tursa 2012 年 2 月 2 日
y = cumsum(x);
  1 件のコメント
rami
rami 2012 年 2 月 2 日
Thx

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by