Block type: switchCase
| Parameter | Description |
|---|---|
| input ports | 1 input port: the control value. |
| Parameter | Description |
|---|---|
| output ports | One output per case, plus an optional default output. |
Routes an integer control to one of several action outputs.
The scalar input is truncated toward zero to an integer and matched against
CaseConditions, a cell literal such as {1, [7 9 4]}. The first
matching case drives its output to 1.0 and every other output to 0.0.
With ShowDefaultCase set to on, an unmatched value drives the last
(default) output. There is no fall-through. These outputs are meant to gate action subsystems.
Parameters
| Parameter | Default value |
|---|---|
CaseConditions
|
{1} |
ShowDefaultCase
|
on |
Block Characteristics
| Block type | switchCase |
| Family | Logic blocks |
| Phases | ALGEBRAIC |
Extended Capabilities
Code generation: supported for C and Rust.
| Version | Description |
|---|---|
| 1.0.0 | initial version |