Flipping a Cell Array
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Avery Krovetz
le 5 Juil 2016
Commenté : Stephen23
le 5 Juil 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.
0 commentaires
Réponse acceptée
Walter Roberson
le 5 Juil 2016
NewCell = YourCell([1, m:-1:2], :);
1 commentaire
Stephen23
le 5 Juil 2016
Perhaps easier is to use end:
YourCell([1, end:-1:2], :)
Plus de réponses (1)
Voir également
Catégories
En savoir plus sur Matrices and Arrays dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!