Adding numbers in a row vector
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Ali Fuat Yuvali
am 28 Feb. 2021
Kommentiert: Ali Fuat Yuvali
am 28 Feb. 2021
How can I tell the computer to do this instead of manually typing it?
a = [1,2,3];
alist = [a(1),a(1)+a(2),a(1)+a(2)+a(3)]
Played around with a for loop but it didn't do what I wanted.
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements 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!