Simulink Reference Previous page   Next Page
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

The Mux block accepts real or complex signals of any data type supported by Simulink, including fixed-point data types. The Mux block supports mixed-type vectors.

For a discussion on the data types supported by Simulink, refer to Data Types Supported by Simulink in the Using Simulink documentation.

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 in the model.

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

Previous page  Multiport Switch Outport Next page

© 1994-2005 The MathWorks, Inc.