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

0 votos

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)

Categorías

Más información sobre Matrices and Arrays en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 5 de Jul. de 2016

Comentada:

el 5 de Jul. de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by