How do I reverse the order of two rows of a 4x4 matrix using a for loop?
Mostrar comentarios más antiguos
This is what I have figured out so far;
A=rand(4,4);
A(1,:)=fliplr(A(1,:));
A(3,:)=fliplr(A(1,:));
A
Respuestas (1)
James Tursa
el 3 de Mzo. de 2015
Did you mean this?
A(3,:)=fliplr(A(3,:)); % replaced 1 with a 3
If not, can you describe your problem in more detail?
1 comentario
Robyn Doherty
el 3 de Mzo. de 2015
Categorías
Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!