[TOC]
logical
Converting to a logical array
Usage
logical(A)
A
is a numeric array
It converts
A
to a logical array.
The output contains a logical zero (one) if the corresponding element of
A
has zero (non-zero) value.
A
should not contain
NaN
values.
If
A
is a character array, it is first converted to a double array.
It returns an empty matrix if
A
is empty.