Flipping a Cell Array

조회 수: 1 (최근 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 CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by