Replace elements in array
Mostrar comentarios más antiguos
I apologize if the question is very stupid. I am quite familiar with the basic functions of matlab, but I do not know such a function. Maybe there isn't one, which is why I'm asking. I'm looking for the best algorithm to do this. Let A be an array of numbers. I have provided an example below. Vector A is not symmetric and needs an algorithm that repeats the lines below. If there is no such thing, then thank you for your attention.
A = [1, 2, 3, 4, 5, 6];
aa = A(2);
A(2) = A(3);
A(3) = aa;
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Whos 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!