logical

Syntax

Description

L = logical(A) converts A into
an array of logical values. Any nonzero element of A is
converted to logical 1 (true)
and zeros are converted to logical 0 (false).
Complex values and NaNs cannot be converted to logical values and
result in a conversion error.