DSP Blockset Previous page   Next Page
Multiport Selector

Distribute arbitrary subsets of input rows or columns to multiple output ports

Library

Signal Management / Indexing

Description

The Multiport Selector block extracts multiple subsets of rows or columns from M-by-N input matrix u, and propagates each new submatrix to a distinct output port. A length-M 1-D vector input is treated as an M-by-1 matrix.

The Indices to output parameter is a cell array whose kth cell contains a one-dimensional indexing expression specifying the subset of input rows or columns to be propagated to the kth output port. The total number of cells in the array determines the number of output ports on the block.

When the Select parameter is set to Rows, the specified one-dimensional indices are used to select matrix rows, and all elements on the chosen rows are included. When the Select parameter is set to Columns, the specified one-dimensional indices are used to select matrix columns, and all elements on the chosen columns are included. A given input row or column can appear any number of times in any of the outputs, or not at all.

When an index references a nonexistent row or column of the input, the block reacts with the behavior specified by the Invalid index parameter. The following options are available:

Examples

Consider the following Indices to output cell array:

This is a four-cell array, which requires the block to generate four independent outputs (each at a distinct port). The table below shows the dimensions of these outputs when Select = Rows and the input dimension is M-by-N.

Cell
Expression
Description
Output Size
1
4
Row 4 of input
1-by-N
2
[1:2 5]
Rows 1, 2, and 5 of input
3-by-N
3
[7;8]
Rows 7 and 8 of input
2-by-N
4
10:-1:6
Rows 10, 9, 8, 7, and 6 of input
5-by-N

Dialog Box

Select
The dimension of the input to select, Rows or Columns.
Indices to output
A cell array specifying the row- or column-subsets to propagate to each of the output ports. The number of cells in the array determines the number of output ports on the block.
Invalid index
Response to an invalid index value. Tunable.

Supported Data Types

To learn how to convert your data types to the above data types in MATLAB and Simulink, see Supported Data Types and How to Convert to Them.

See Also

Permute Matrix
DSP Blockset
Selector
Simulink
Submatrix
DSP Blockset
Variable Selector
DSP Blockset


Previous page  Multiphase Clock N-Sample Enable Next page

Learn more about the latest releases of MathWorks products:

 © 1994-2009 The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS