Hi if i have x matrix from 1 to i have many different value and i want creat a new matrix y where
y(1)=x(1)
y(2)=x(1)+x(2)
y(3)=x(1)+x(2)+x(3)
y(i)=x(1)+...+x(i)
how i can make it thx

 채택된 답변

James Tursa
James Tursa 2012년 2월 2일

2 개 추천

y = cumsum(x);

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Discrete Data Plots에 대해 자세히 알아보기

태그

질문:

2012년 2월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by