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.

 Accepted Answer

NewCell = YourCell([1, m:-1:2], :);

1 Comment

Perhaps easier is to use end:
YourCell([1, end:-1:2], :)

Sign in to comment.

More Answers (1)

Categories

Find more on Modeling in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!