N-Sample Switch
R2026bSwitch between two inputs after specified number of sample periods
Libraries:
DSP System Toolbox /
Signal Management /
Switches and Counters
Description
The N-Sample Switch block outputs the signal connected to the top input port during the first N sample times after the simulation begins or the block is reset, where you specify N in the Switch count parameter. Beginning with output sample N+1, the block outputs the signal connected to the bottom input until the next reset event or the end of the simulation.
Ports
Input
Output
Parameters
Block Characteristics
Data Types |
|
Direct Feedthrough |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Zero-Crossing Detection |
|
Programmatic Use: Add Block
To add the block programmatically, use the add_block function with one of these library block paths as the source.
"dspswit3/N-Sample Switch"
Example: add_block("dspswit3/N-Sample Switch","myModel/myBlock",MakeNameUnique="on")
Extended Capabilities
Version History
Introduced before R2006a

