Create a square matrix with a nested loop
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
-20 -18 -16 -14
-12 -10 -8 -6
-4 -2 0 2
4 6 10 12
can you create it with a loop inside
3 comentarios
Respuestas (2)
Clement Val
el 31 de Ag. de 2020
Editada: Clement Val
el 31 de Ag. de 2020
reshape([-20:2:10], 4, 4)'
Just (half) kidding.
You know how to do a loop?
You know how to index in a 2 dim array?
You know how to increment another variable by two?
0 comentarios
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!