Using switch-case. Return to beginning of switch-case statement
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Essentially, I'd like the user to input a number 0-3.
i.e.
A = input ('Enter a number (0-3)');
switch A case 0 %Do something case 1 %Do something else case 2 %Do something else case 3 %Do something else otherwise %Invalid number.
end
So, in the otherwise statement, how would I go about returning to the beginning of the switch? So that one would not have to run the program again?
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical 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!