ALL

Purpose:

Returns 1 if all elements of the input are non-zero.

Syntax:

ALL(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:

all(3)

 

returns 1.0

Example:

all({0.0, 1.0})

 

returns 0.0

Example:

all(ones(3,1))

 

returns 1.0

Example:

all(ones(3,3))

 

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

Example:

all({})

 

returns 1.0

Remarks:

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

See Also:

ANY

FIND

ONES

ZEROS