フィルターのクリア

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 Center および File ExchangeMathematics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by