function n = numel( obj, varargin )
%NUMEL Number of elements in distributed array or subscripted array expression
%   N = NUMEL(A) returns the number of underlying elements, N, in distributed 
%   array A.
%   
%   N = NUMEL(A, INDEX1, INDEX2, ...) returns in N the number of 
%   subscripted elements in distributed array A(index1, index2, ...).
%   
%   Example:
%       N = 1000;
%       A = distributed.ones(3,4,N);
%       ne = numel(A)
%   
%   returns ne = 12000.
%   
%   See also NUMEL, DISTRIBUTED.
%   


%   Copyright 2008-2016 The MathWorks, Inc.

n = distributedutil.numelHelper(size(obj), istable(obj), varargin{:});

end
