Multiple output in Switch block

I want to make a Simulink Model using switch block such that if x=1, then a=1, b=2, c=3 , else a=4, b=5, c=6
How can i have multiple outputs using switch block in Simulink? x is a constant.

Respuestas (1)

Fangjun Jiang
Fangjun Jiang el 11 de Sept. de 2023

0 votos

Using your example, just specify the top input as constant [1, 2,3], the bottom input as constant [4,5,6]. The output will be a 1x3 vector (or 3x1). Then use a Demux block to get a, b, c.

Categorías

Más información sobre Simulink Functions en Centro de ayuda y File Exchange.

Productos

Versión

R2021b

Preguntada:

el 11 de Sept. de 2023

Respondida:

el 11 de Sept. de 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by