Add value in column to previous?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
matlabuser12
am 15 Jan. 2015
Bearbeitet: matlabuser12
am 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 Kommentare
Akzeptierte Antwort
Azzi Abdelmalek
am 15 Jan. 2015
Bearbeitet: Azzi Abdelmalek
am 15 Jan. 2015
a=[1 1 1 1 1]
b=cumsum(a)
1 Kommentar
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!