Summing of no. in a coloumn

조회 수: 3(최근 30일)
G Purnachander
G Purnachander 2022년 4월 5일
댓글: G Purnachander2022년 4월 6일
hi sir.
a=(640.0
640.5
641.0
640.0
.....n)
s = a1+a2
s1= a1+a2+a3
s2= a1+a2+a3+a4
.
.
.
sn = a1+a2+.......+an
can i get a code for this series sir
댓글 수: 2
G Purnachander
G Purnachander 2022년 4월 6일
Hi, John, very nice of you, I am novice to Matlab, However you gave me a good direction for the problem I am looking for. Thank you. G D Purnachander

댓글을 달려면 로그인하십시오.

답변(1개)

DGM
DGM 2022년 4월 5일
A = 1:10
A = 1×10
1 2 3 4 5 6 7 8 9 10
B= cumsum(A)
B= 1×10
1 3 6 10 15 21 28 36 45 55

Community Treasure Hunt

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

Start Hunting!

Translated by