Learn R Programming

pracma (version 1.9.9)

numel: Number of Elements

Description

Number of elements in a vector, matrix, or array.

Usage

numel(x)

Arguments

x
a vector, matrix, array or list

Value

the number of elements of a.

See Also

size

Examples

Run this code
numel(c(1:12))
numel(matrix(1:12, 3, 4))

Run the code above in your browser using DataLab