フィルターのクリア

array element sum wih condition

3 ビュー (過去 30 日間)
Tomas
Tomas 2012 年 4 月 28 日
Hello,guys and girls, i have a situation:
F=[5, 4, 3, 2, 1];
I would like to sum matrix elements in order like this:
5
5+4
5+4+3
5+4+3+2
5+4+3+2+1
Do you have any ideas?

採用された回答

per isakson
per isakson 2012 年 4 月 28 日
Try the function, CUMSUM

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by