Extractor

This block extracts entries of the input matrix for the construction of new output matrices. The indices of the entries of the input matrix and the shapes of output matrices are specified by the block parameters. Any entry of the input matrix may be used any number of times, or not all.

    Extractor

Library

Routing

Description

This block extracts entries of the input matrix for the construction of new output matrices. The indices of the entries of the input matrix and the shapes of output matrices are specified by the block parameters. Any entry of the input matrix may be used any number of times, or not all. The indices should be represented as a scalar or a matrix, and the dimension of extracted data is the same as indices used as block parameters. When an input signal is a matrix rather than a vector, it is indexed in the column major way. For example, the input signal is a matrix [1 2 3;4 5 6;7 8 9], to extract the entries by indices [4 3 2 1], the extracted vector is [2 7 4 1]

Parameters

Extractor_0

NameLabelDescriptionData TypeValid Values

nout

Number of outputs

Specify the number of output signals to be extracted.

Number

extractor

Extractor Index

Specify the entries to be extracted by indices, it could be a scalar or a matrix, same indices are allowed in a matrix.

Structure

extractor/index

Index

Cell of matrices

externalActivation

External activation

Specifies whether the block receives an external activation or inherits its activation through its regular input ports. When External Activation is selected, an additional activation port is added to the block. By default, external activation is not selected.

Number

0
1

Ports

NameTypeDescriptionIO TypeNumber

Port 1

explicit

output

nout

Port 2

explicit

input

1

Port 3

activation

input

externalActivation

Advanced Properties

NameValueDescription

always active

no

direct-feedthrough

yes

zero-crossing

no

mode

no

continuous-time state

no

discrete-time state

no