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일

0 개 추천

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

댓글 수: 1

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

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2016년 7월 5일

0 개 추천

A(2:m,:)=flipud(A(2:m,:))

카테고리

도움말 센터File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

태그

질문:

2016년 7월 5일

댓글:

2016년 7월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by