DSP Blockset
  Go to block:
    Search    Help Desk 
Submatrix    See Also

Select a subset of elements (submatrix) in a matrix.

Library

Matrix Functions, in Math Functions

Description

The Submatrix block outputs a matrix that is a subset of the input matrix. The submatrix is specified by the Index expression parameter, a cell array containing a comma-separated MATLAB indexing expression, expr. For input u and output y, the indexing operation is equivalent to:

The end keyword and lone colon (:) operator are not supported in the indexing expression.

Some examples of valid indexing expressions are:

Index Expression
Equivalent MATLAB Code
{1:2,2:3}
y = u(1:2,2:3)
{a,b:c}
y = u(a,b:c)
{[1 3:5],5}
y = u([1 3:5],5)

Dialog Box

Input matrix size
The dimensions of the input matrix.
Index expression
The indexing expression, {rows,columns}. Note the cell array braces. The indexing expression can be changed while the simulation runs, although the dimensions of the specified submatrix must remain the same.

See Also

Selector (Simulink)
Variable Selector


[ Previous | Help Desk | Next ]