how to circularly shift the entire elements of a matrix
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
i need to shift the elements by one position if the input is
a=[1 2 3;4 5 6;7 8 9]
the output i needed is
b=[9 1 2;3 4 5;6 7 8]
pls send me the code
0 comentarios
Respuestas (1)
Stephen23
el 21 de Mzo. de 2018
>> b = a.';
>> b(:) = b([end,1:end-1]);
>> c = b.'
c =
9 1 2
3 4 5
6 7 8
0 comentarios
Ver también
Categorías
Más información sobre Spline Postprocessing 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!