isbool

Determines if x is a logical value.

Syntax

R = isbool(x)

Inputs

x
scalar | complex number | matrix | string

Outputs

R
Boolean value true or false.

Example

Logical test:

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