Main Content

PS Selector

R2026b

Select elements from vector or matrix input physical signal

Since R2023b

  • PS Selector block

Libraries:
Simscape / Foundation Library / Physical Signals / Nonlinear Operators

Description

The PS Selector block lets you select one or more elements from the input vector or matrix. Use the Indices parameter to select elements in the input signal. The indices can be in any order, to enable construction of permutations and repeats.

Ports

Input

expand all

Input physical signal specified as a vector or matrix.

The port name is not visible in the block icon, but you can see this name in the underlying source file by clicking the Source code link in the Description tab of the block dialog box.

Programmatic Use

Port: I

Output

expand all

Output physical signal containing the selected elements of the input signal.

The port name is not visible in the block icon, but you can see this name in the underlying source file by clicking the Source code link in the Description tab of the block dialog box.

Programmatic Use

Port: O

Parameters

expand all

Select elements of the input signal by specifying their indices. The parameter value can be a scalar or vector of integers ranging from 1 to the number of elements in the input signal. The indices can be in any order, to enable construction of permutations and repeats.

Programmatic Use

Parameter: ix

Programmatic Use: Add Block

To add the block programmatically, use the add_block function with one of these library block paths as the source.

"fl_lib/Physical Signals/Nonlinear Operators/PS Selector"

Example: add_block("fl_lib/Physical Signals/Nonlinear Operators/PS Selector","myModel/myBlock",MakeNameUnique="on")

For information about programmatic access to individual block parameters, see the Programmatic Use section of parameter descriptions on this page.

Extended Capabilities

expand all

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2023b