Switch case inside of another switch case

답변 (1개)

Sean de Wolski
Sean de Wolski 2014년 12월 30일

2 개 추천

x = 2;
y = 3;
switch x
case 1
disp 1
case 2
switch y
case 2
disp Ha!
case 3
disp HaHa!
otherwise
disp Nah
end
end

댓글 수: 1

Jan
Jan 2014년 12월 30일
편집: Jan 2014년 12월 30일
+1. A complete answer although it is trivial.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 MATLAB Report Generator에 대해 자세히 알아보기

질문:

2014년 12월 30일

편집:

Jan
2014년 12월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by