Can I use case 1 || case 2 while using switch thread?
Ältere Kommentare anzeigen
switch matlab_review
case 'good' || case 'interesting'
fprintf('Review is positive\n');
otherwise
fprintf('Not so good review\n');
end
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Get Started with MATLAB finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!