Filter löschen
Filter löschen

Switch case inside of another switch case

31 Ansichten (letzte 30 Tage)
António
António am 30 Dez. 2014
Bearbeitet: Jan am 30 Dez. 2014
How can i put a switch case inside of another switch case?

Antworten (1)

Sean de Wolski
Sean de Wolski am 30 Dez. 2014
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 Kommentar
Jan
Jan am 30 Dez. 2014
Bearbeitet: Jan am 30 Dez. 2014
+1. A complete answer although it is trivial.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by