필터 지우기
필터 지우기

Series of vector values

조회 수: 3 (최근 30일)
Nicolò Monaco
Nicolò Monaco 2021년 3월 15일
댓글: Nicolò Monaco 2021년 3월 15일
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?

채택된 답변

Steven Lord
Steven Lord 2021년 3월 15일
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
Nicolò Monaco
Nicolò Monaco 2021년 3월 15일
sorry for the stupid question, but thank youuu :)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by