Flipping a Cell Array

11 ビュー (過去 30 日間)
Avery Krovetz
Avery Krovetz 2016 年 7 月 5 日
コメント済み: Stephen23 2016 年 7 月 5 日
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.

採用された回答

Walter Roberson
Walter Roberson 2016 年 7 月 5 日
NewCell = YourCell([1, m:-1:2], :);
  1 件のコメント
Stephen23
Stephen23 2016 年 7 月 5 日
Perhaps easier is to use end:
YourCell([1, end:-1:2], :)

サインインしてコメントする。

その他の回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2016 年 7 月 5 日
A(2:m,:)=flipud(A(2:m,:))

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by