numel

numel(X) returns the number of elements of X.

Examples

> X = rand(2,4)

> numel(X)#

	8
> X = {'a' 'b' 'c'}

> numel(X)#

	3

Resources

See also

prod | size