logical type functions any >>

all


all of the elements of a matrix satisfy some condition.


Syntax


R = all(M)
R = all(M, dim)

Input argument


M

a matrix.

dim

a integer value: dimension along it works.

Output argument


R

a logical matrix.

Description


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

Example


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

See also


any.

History


Version Description
1.0.0 initial version

Author


Allan CORNET

logical type functions any >>