Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ベクトルの を取得したいのcumsumですが、ベクトルの最初の要素もそれ自体をカウントする必要があります。例:
cumsum
a = [1 2 3 4 5]
結果は次のようになります。
2 3 6 10 15