Filter löschen
Filter löschen

Series of vector values

3 Ansichten (letzte 30 Tage)
Nicolò Monaco
Nicolò Monaco am 15 Mär. 2021
Kommentiert: Nicolò Monaco am 15 Mär. 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?

Akzeptierte Antwort

Steven Lord
Steven Lord am 15 Mär. 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 Kommentar
Nicolò Monaco
Nicolò Monaco am 15 Mär. 2021
sorry for the stupid question, but thank youuu :)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Mathematics finden Sie in Help Center und File Exchange

Produkte


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by