Switch case inside of another switch case
30 次查看(过去 30 天)
显示 更早的评论
How can i put a switch case inside of another switch case?
0 个评论
回答(1 个)
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
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!