Flipping a Cell Array

1 visualización (últimos 30 días)
Avery Krovetz
Avery Krovetz el 5 de Jul. de 2016
Comentada: Stephen23 el 5 de Jul. de 2016
I have an m x n cell array and I need to flip the 2:m elements vertically. Flipud doesn't seem to be working neither does flipdim(...,1). Suggestions?
Edit: I'm using R2012a.

Respuesta aceptada

Walter Roberson
Walter Roberson el 5 de Jul. de 2016
NewCell = YourCell([1, m:-1:2], :);
  1 comentario
Stephen23
Stephen23 el 5 de Jul. de 2016
Perhaps easier is to use end:
YourCell([1, end:-1:2], :)

Iniciar sesión para comentar.

Más respuestas (1)

Azzi Abdelmalek
Azzi Abdelmalek el 5 de Jul. de 2016
A(2:m,:)=flipud(A(2:m,:))

Categorías

Más información sobre Matrices and Arrays en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by