フィルターのクリア

Switch case inside of another switch case

31 ビュー (過去 30 日間)
António
António 2014 年 12 月 30 日
編集済み: Jan 2014 年 12 月 30 日
How can i put a switch case inside of another switch case?

回答 (1 件)

Sean de Wolski
Sean de Wolski 2014 年 12 月 30 日
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.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by