function maesize(array)
%MAEDIMS  Print the size (dimensions) of a 2D numeric array.
%   Intended for use only by the Array Editor.
%   ARRAY is the array input.
%   First print a status code:
%       0 => the array exists and is 2D numeric
%       2 => the array is non-numeric
%       3 => the array is multidimensional
%   If ARRAY is 2D numeric, then print its dimensions on a single line.

%   Copyright (c) 1984-98 by The MathWorks, Inc.
%   $Revision: 1.4 $  $Date: 1998/05/28 19:51:14 $

if nargin == 0
   error('Too few input arguments: you must provide the input array.');
end

% save user's printing format and set default format to avoid any problems
% in parsing the printed values in the Array Editor
saveFormat = get(0, 'Format');
format;

status = 0;          % assume success
if isnumeric(array)
   if length(size(array)) > 2
      status = 3;    % the array is multidimensional
   end
else
   status = 2;       % the array is non-numeric
end
disp(status);

% If everything's OK, then print the array dimensions.
if status == 0
   disp(size(array));
end

% restore user's printing format
set(0, 'Format', saveFormat);
