Add value in column to previous?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
matlabuser12
le 15 Jan 2015
Modifié(e) : matlabuser12
le 15 Jan 2015
data_input=[1;1;1;1;1;1;1]
data_output=[1;2;3;4;5;6;7]
how can i achieve this with a for loop? basically take the preceding value and add it to the next one and then repeat as new values emerge.
0 commentaires
Réponse acceptée
Azzi Abdelmalek
le 15 Jan 2015
Modifié(e) : Azzi Abdelmalek
le 15 Jan 2015
a=[1 1 1 1 1]
b=cumsum(a)
1 commentaire
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Matrix Indexing dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!