&&

Short circuit boolean and operator.

R = A && B

Inputs

A
Anything that can be converted to a Boolean value.
Type: double | int
Dimension: scalar | vector | matrix
B
Anything that can be converted to a Boolean value.
Type: double | int
Dimension: scalar | vector | matrix

Outputs

R
Scalar Boolean evaluation of the operand.

Example

Basic.

a = true
b = false
a && b
a = 1  b = 0  R = 0  

Example

The following expression is only executed if the preceding expression is true.

b = true
exist('a') && b
b = 1
R = 1