Simulink Reference    
Mux

Combine several input signals into a vector or bus output signal

Library

Signal Routing

Description


The Mux block combines its inputs into a single output. An input can be a scalar, vector, or matrix signal. Depending on its inputs, the output of a Mux block is a vector or a composite signal, i.e., a signal containing both matrix and vector elements. If all of a Mux block's inputs are vectors or vector-like, the block's output is a vector. A vector-like signal is any signal that is a scalar (one-element vector), a vector, or a single-column or single-row matrix. If any input is a non-vector-like matrix signal, the output of the Mux block is a bus signal. Bus signals can drive only virtual blocks, e.g., Demux, Subsystem, or Goto blocks.

The Mux block's Number of Inputs parameter allows you to specify input signal names and dimensionality as well as the number of inputs. You can use any of the following formats to specify this parameter:

Data Type Support

A Mux block accepts real or complex signals of any data type, including fixed-point data types, except int64 and uint64. The Mux block supports mixed-type vectors.

Parameters and Dialog Box

Number of inputs
The number and dimensionality of inputs. You can enter a comma-separated list of signal names for this parameter field.
Display option
The appearance of the block icon in your model.

Display Option
Appearance of Block in Model
none
Mux appears inside block icon
signals
Displays signal names next to each port
bar
Displays the block icon in a solid foreground color

  Multi-Port Switch Outport