How to flip the individual elements in an array

조회 수: 5(최근 30일)
Hari 2016년 11월 17일
댓글: Hari 2016년 11월 17일
I have a 3 x 1 cell array:
Is there a way to form a new cell array which includes these elements as well as their flipped ones,like this:

채택된 답변

KSSV 2016년 11월 17일
편집: KSSV 2016년 11월 17일
doc fliplr
c = {[1,2,5]
[1,2,3,6,15,7]} ;
% reverse the arrays
c1 = cellfun(@fliplr,c,'un',0) ;
iwant = [c ; c1] ;

추가 답변(0개)


Find more on Matrices and Arrays 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!

Translated by