フィルターのクリア

About Switch case construction.

2 ビュー (過去 30 日間)
Cláudio  Rocha Júnior
Cláudio Rocha Júnior 2017 年 3 月 9 日
編集済み: Victor 2017 年 3 月 9 日
Hello, I have a doubt about how may I set a Switch-case construction inside one case of other switch-case block. But in one of the cases of the second switch-case I want to return to the previous one, being able to go for other case.
Thank you!

回答 (1 件)

Victor
Victor 2017 年 3 月 9 日
編集済み: Victor 2017 年 3 月 9 日
In a single switch-case construction you can go only to one of the cases. Check this code and change 2.0 to 2:
S = 2;
switch S
case 1
disp('q');
case 2
disp('w');
case 3
disp('e');
case 2.0
disp('r');
end

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by