Accumulate[list]
list 中の要素の連続累計のリストを与える.
Accumulate
Accumulate[list]
list 中の要素の連続累計のリストを与える.
詳細とオプション
- Accumulate[list]は list と同じ長さである.
- Accumulate[list]は,実質的にFoldList[Plus,list]と等価である.
- Accumulate[list,Method"CompensatedSummation"]は補正加算を使って結果の数値誤差を小さくする.
例題
すべて開く すべて閉じる例 (2)
スコープ (3)
定期的にサンプルされたTimeSeriesを累積する:
v = {3, 8, 4, 11, 9, 2};
ts = TimeSeries[v, Automatic]RegularlySampledQ[ts]res = Accumulate[ts]res["Path"]Accumulate[v]v = {3, 8, 4, 11, 9, 2};
t = {1, 3, 5, 6, 7, 10};
ts = TimeSeries[v, {t}];RegularlySampledQ[ts]res1 = Accumulate[ts["Values"]]新たな時系列を定義し,TemporalRegularityをTrueに設定することもできる:
ts2 = TimeSeries[ts, TemporalRegularity -> True];ts["Path"] == ts2["Path"]これで,Accumulateの結果がTimeSeriesで与えられるようになった:
res2 = Accumulate[ts2]res2["Values"] == res1data = Quantity[RandomReal[1, 6], "Meters"]Accumulate[data]一般化と拡張 (1)
頭部がListである必要はない:
Accumulate[f[a, b, c, d]]アプリケーション (4)
Accumulate[Range[10]]ListLinePlot[Accumulate[RandomReal[{-1, 1}, 100]]]ListPlot3D[Accumulate[RandomReal[{-.1, 1}, {30, 30}]]]List@@Normal[Series[Sin[x], {x, 0, 10}]]Plot[Evaluate[Accumulate[%]], {x, 0, 2Pi}]特性と関係 (3)
DifferencesはAccumulateのほぼ正反対である:
Accumulate[Range[10]]Differences[%]AccumulateはFoldListの特定のケースと等価である:
FoldList[Plus, {a, b, c, d}]Accumulate[{a, b, c, d}]Sumを使って数列を記号的に累積する:
s = Sum[i ^ 2, {i, 1, n}]Table[s, {n, 1, 10}]Accumulate[Table[i ^ 2, {i, 1, 10}]]考えられる問題 (1)
不規則にサンプルを取られた時系列を直接累積したものは,その値を累積したものとは異なることがある:
v = {3, 8, 4, 11, 9, 2};
t = {1, 3, 5, 6, 7, 10};
ts = TimeSeries[v, {t}]ts["Path"]RegularlySampledQ[ts]res = Accumulate[ts]res["Path"]av = Accumulate[v]時系列は,まずMinimumTimeIncrementに従ってアップサンプルされ,次にダウンサンプルされている:
ts1 = TimeSeriesResample[ts];
aux = Accumulate[ts1];
res1 = TimeSeriesResample[aux, {t}]res1["Path"] == res["Path"]ts2 = TimeSeries[ts, TemporalRegularity -> True]ts["Path"] == ts2["Path"]res2 = Accumulate[ts2]res2["Path"]res2["Values"] == av関連するガイド
-
▪
- リストへの数学的およびカウント操作 ▪
- 離散データと整数データ ▪
- 算術関数 ▪
- データの変換と平滑化 ▪
- GPU計算 ▪
- 数値データ ▪
- 時系列の処理 ▪
- 関数のリストへの適用 ▪
- 離散微積分 ▪
- NVIDIAを使ったGPU計算 ▪
- 事象系列の処理
テキスト
Wolfram Research (2007), Accumulate, Wolfram言語関数, https://reference.wolfram.com/language/ref/Accumulate.html (2008年に更新).
CMS
Wolfram Language. 2007. "Accumulate." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2008. https://reference.wolfram.com/language/ref/Accumulate.html.
APA
Wolfram Language. (2007). Accumulate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Accumulate.html
BibTeX
@misc{reference.wolfram_2026_accumulate, author="Wolfram Research", title="{Accumulate}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/Accumulate.html}", note=[Accessed: 09-August-2026]}
BibLaTeX
@online{reference.wolfram_2026_accumulate, organization={Wolfram Research}, title={Accumulate}, year={2008}, url={https://reference.wolfram.com/language/ref/Accumulate.html}, note=[Accessed: 09-August-2026]}