필터 지우기
필터 지우기

How to formulate the summation of sequence number

조회 수: 2 (최근 30일)
Skydriver
Skydriver 2020년 3월 28일
댓글: Skydriver 2020년 3월 28일
I have a sequence data between X and Y. In general Y is X summation
X Y
6.84 6.84
12.04 18.88
9.47 28.35
8.53 36.88
6.91 43.79
2.93 46.72
0.82 47.54
0.54 48.08
0 48.08
0 48.08
Y1=X1
Y2=X1+X2
Y2=X1+X2+X3
how to develop the function.
Thanks
  댓글 수: 3
Skydriver
Skydriver 2020년 3월 28일
Can you tell me in detail ?
Walter Roberson
Walter Roberson 2020년 3월 28일
Tommy's code has the entire detail of the code.

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

채택된 답변

Tommy
Tommy 2020년 3월 28일
Try
Y = cumsum(X)
  댓글 수: 3
Walter Roberson
Walter Roberson 2020년 3월 28일
If agreement to within roundoff error is not good enough, then what do you require?
Skydriver
Skydriver 2020년 3월 28일
Thank you it works know

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by