ANY

Purpose:

Returns 1 if any element of the input is non-zero.

Syntax:

ANY(val)

val

-

A scalar, string or series.

Returns:

The scalar 1.0 or 0.0 or a row array if the input is an array with more than 1 row and column.

Example:

any(3)

 

returns 1.0

Example:

any({0.0, 1.0})

 

returns 1.0

Example:

any(zeros(3,1))

 

returns 0.0

Example:

any(zeros(3,3))

 

returns the 1x3 array {{0.0, 0.0, 0.0}}

Example:

any({})

 

returns 0.0

Remarks:

The input is cast to a series if it is a scalar or a string.

See Also:

ALL

FIND

ONES

ZEROS