Flipping a Cell Array

1 Ansicht (letzte 30 Tage)
Avery Krovetz
Avery Krovetz am 5 Jul. 2016
Kommentiert: Stephen23 am 5 Jul. 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.

Akzeptierte Antwort

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

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

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

Kategorien

Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by