www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/FlipMultidimensionalArrayflipudExample.m

    %% Flip Multidimensional Array  

%% 
% Create a multidimensional array. 
A = cat(3, [1 2; 3 4], [5 6; 7 8]) 

%%
% |A| is an array of size 2-by-2-by-2.  

%% 
% Flip the elements on each page of |A| in the vertical direction. 
B = flipud(A) 

%%
% The result, |B|, is the same size as |A|, but the vertical order of the
% elements is flipped. The operation flips the elements on each page independently.