Effacer les filtres
Effacer les filtres

sum in matrix

1 vue (au cours des 30 derniers jours)
rami
rami le 2 Fév 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

Réponse acceptée

James Tursa
James Tursa le 2 Fév 2012
y = cumsum(x);
  1 commentaire
rami
rami le 2 Fév 2012
Thx

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by