Scalar:

Matrix:

**Block Category:** Nonlinear, Fixed Point

**Inputs:** Real, complex, or fixed-point (scaled_int)
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 is automatically truncated to integer. The block output is
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 connectors indicate
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**