필터 지우기
필터 지우기

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 CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by