Series of vector values

1 view (last 30 days)
Nicolò Monaco
Nicolò Monaco on 15 Mar 2021
Commented: Nicolò Monaco on 15 Mar 2021
I have a vector and I want another vector of the same lenght having as values the sequential sum of the values of the first vector. Basically I want a series from vector values. Ideas?

Accepted Answer

Steven Lord
Steven Lord on 15 Mar 2021
You want the cumulative sum?
x = 1:10
x = 1×10
1 2 3 4 5 6 7 8 9 10
y = cumsum(x)
y = 1×10
1 3 6 10 15 21 28 36 45 55
  1 Comment
Nicolò Monaco
Nicolò Monaco on 15 Mar 2021
sorry for the stupid question, but thank youuu :)

Sign in to comment.

More Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!