Scalar:

Matrix:

**Block Category:** Nonlinear

**Inputs:** Real, complex, or fixed-point scalars, or
vectors, matrices, or alphanumeric strings. If *x*_{1} is a matrix,
*x*_{2} and *x*_{3} should have the same
dimension.

**Description:** The merge block expects a Boolean
signal on *x*_{1}. If the signal on *x*_{1 }is
floating point, it will be automatically truncated to integer. The block output
will be the value presented on *x*_{2} if *x*_{1} is
nonzero; otherwise, the output is *x*_{3}. The letters b, t, and f on the input connector tabs
stand for Boolean, True, and False.

The merge block is particularly well-suited for performing if-then-else decisions.

**Label:** Indicates a user-defined block label that appears when
**View > Block Labels** is activated.

**1. Simple If-Then-Else using merge block**

**2. Cascading If-Then-Else using merges**