필터 지우기
필터 지우기

Multiple output in Switch block

조회 수: 5 (최근 30일)
Sulagna
Sulagna 2023년 9월 11일
답변: Fangjun Jiang 2023년 9월 11일
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.

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2023년 9월 11일
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.

카테고리

Help CenterFile Exchange에서 Subsystems에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by