www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/FlipNDArrayExample.m
%% Flip N-D Array %% % Create a 1-by-3-by-2 array. A = zeros(1,3,2); A(:,:,1) = [1 2 3]; A(:,:,2) = [4 5 6]; A %% % Flip |A| without specifying the |dim| argument. B = flip(A) %% % Now, flip |A| along the third dimension. B = flip(A,3)