islogical

Determines if x is a logical value.

Syntax

R = islogical(x)

Inputs

x
Any valid scalar | string | vector | matrix.
Type: double | integer | char | string | logical | struct | cell
Dimension: scalar | string | vector | matrix

Outputs

R
Boolean value true or false.

Example

Logical test:

R = islogical(false)
R = islogical(true(4))
R = islogical('test')
R = 1
R = 1
R = 0