| Using Simulink | Search  Help Desk |
| Demux |
Separate a vector signal into output signals.
Library
Signals & SystemsDescription
Scalar Number of Outputs
If the Number of outputs parameter field contains a scalar value, the block separates the input signal into that number of output signals. The widths of the output signals depend on the width of the input vector and the number of outputs:3.


Vector Number of Outputs
If the Number of outputs parameter is a vector, the number of output lines is equal to the number of elements in the vector. The output signal widths depend on the input vector width and the values of the elements of the parameter. You can explicitly size output signals or let Simulink determine their widths.[2 4 1].
In this model, the input signal is a vector of width seven and the Number of outputs parameter is [-1 3 -1]. In this example, Simulink explicitly generates a three-element vector signal as the second output and dynamically sizes the other two outputs by dividing the remaining input elements as evenly as possible. In this case, the four elements divide equally.

In the next example, the Number of outputs is specified as [-1 4 -1]. This parameter causes Simulink to generate unequal output vectors.

[-1 -1 -1] is the same as specifying a parameter value of 3.
Using a Variable to Provide the Number of Outputs Parameter
When you specify the Number of outputs parameter as a variable, Simulink issues an error message if the variable is undefined in the workspace. NoteData Type Support
A Demux block accepts and outputs signals of any numeric (complex or real) and data type.Parameters and Dialog Box
