Adding numbers in a row vector
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Ali Fuat Yuvali
le 28 Fév 2021
Commenté : Ali Fuat Yuvali
le 28 Fév 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 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Loops and Conditional Statements 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!