function y = flipdim(x,dim)
%FLIPDIM Flip tall matrix along specified dimension.
%   FLIPDIM is not recommended. Use FLIP instead.
% 
%   FLIPDIM(X,DIM)
%
%   Limitations:
%   DIM must be greater than one.
%
%   See also FLIP, TALL.

%   Copyright 2017-2018 The MathWorks, Inc.

% Do some error checking up-front since FLIPDIM and FLIP do this
% differently
if nargin~=2
    error(message('MATLAB:flipdim:nargin'));
end
tall.checkNotTall(upper(mfilename), 2, dim); % DIM cannot be tall
tall.validateSyntax(@flipdim, {x, dim}, 'DefaultType', 'double');

dim = floor(dim);
if dim == 1
    error(message('MATLAB:bigdata:array:FlipTallDim'));
else
    y = slicefun(@flipdim, x, dim);
end

% Output is always same size and type as the input
y.Adaptor = x.Adaptor;

end
