Adding numbers in a row vector
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Ali Fuat Yuvali
el 28 de Feb. de 2021
Comentada: Ali Fuat Yuvali
el 28 de Feb. de 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 comentarios
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Loops and Conditional Statements en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!