Learn R Programming

matlab (version 1.0.2)

numel: MATLAB numel function

Description

Provides number of elements in array A or subscripted array expression.

Usage

numel(A, varargin)

Arguments

A
object of which to determine the number of elements
varargin
unimplemented

Value

Returns prod(size(A)).

See Also

prod, size

Examples

Run this code
numel(2:9)	# 8
numel(magic(4))	# 16

Run the code above in your browser using DataLab