Determine if input is logical array
tf = islogical(A)
tf = islogical(A)
returnstrue
ifA
is a logical array andfalse
otherwise.islogical
also returnstrue
ifA
is an instance of a class that is derived from thelogical
class.
These examples show the valuesislogical
returns when passed specific types:
% Relational operators return logical valuesislogical(5<7) ans = 1% true and false return logical valuesislogical(true) & islogical(false) ans = 1% Constants are double-precision by defaultislogical(1) ans = 0% logical creates logical valuesislogical(logical(1)) ans = 1