ANYM

Returns the logical sum of the elements of a matrix. If any value is nonzero, the result is nonzero.

Format

ANYM (M)

Argument

 
M
A matrix of arbitrary shape.

Examples

The following examples illustrate the use of the ANYM function:
 
Function
ANYM({8, 0, 1})
Result
1
 
Function
ANYM({0, 0, 0})
Result
0
 
Function
ANYM({[4, 0], [0, 0]})
Result
1