any

any of the elements of a matrix satisfy some condition.

Syntax

  • R = any(M)

  • R = any(M, dim)

Input argument

  • M - a matrix.

  • dim - a integer value: dimension along it works.

Output argument

  • R - a logical matrix.

Description

any returns true if any of the elements of a matrix satisfy some condition.

Example

any([33, 22; 11, 0])
any([33, 22; 11, 0], 2)

See also

all.

History

VersionDescription

1.0.0

initial version

Author

anyan CORNET

Last updated