nnz: Nonzero Elements

Description Usage Arguments Value See Also Examples

View source: R/size.R

Description

Number of non-zero elements.

Usage

1
nnz(x)

Arguments

x

a numeric or complex vector or matrix.

Value

the number of non-zero elements of x.

See Also

find

Examples

1
nnz(diag(10))

pracma documentation built on Jan. 30, 2018, 5:04 p.m.