islogical
Test whether the input is of logical (boolean) type.
Syntax
Section titled “Syntax”tf = islogical(A)Description
Section titled “Description”Returns true when A’s element type is the boolean / logical type, false otherwise. Applied elementwise for non-scalar inputs in script mode; scalar in Excel-compatible mode.
Examples
Section titled “Examples”islogical(true) % 1islogical(1) % 0islogical([true false true]) % 1 1 1