Main Content

numel

(Not Recommended) Number of elements in dataset array

The dataset data type is not recommended. To work with heterogeneous data, use the MATLAB® table data type instead. See MATLAB table documentation for more information.

Syntax

n = numel(A)
n = numel(A, varargin)

Description

n = numel(A) returns 1. To find the number of elements, n, in the dataset array A, use prod(size(A)) or numel(A,':',':').

n = numel(A, varargin) returns the number of subscripted elements, n, in A(index1, index2, ..., indexn), where varargin is a string array or cell array whose elements are index1, index2, ... indexn.

See Also

|