%% Flip Matrix
% Create a diagonal matrix, A.

A = diag([100 200 300])

%
% Flip A without specifying the dim argument.

B = flip(A)

%
% Now, flip A along the second dimension.

B = flip(A,2)

% Copyright 2012 The MathWorks, Inc.