Filter löschen
Filter löschen

sum in matrix

1 Ansicht (letzte 30 Tage)
rami
rami am 2 Feb. 2012
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

Akzeptierte Antwort

James Tursa
James Tursa am 2 Feb. 2012
y = cumsum(x);

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by