How to keep looping a switch statement?
이전 댓글 표시
How can I keep looping a switch statement until the user types the word "stop"?
I want the switch to keep looping through the cases until the user types "stop", to which the loop will break.
답변 (1개)
Stephen23
2018년 4월 25일
str = '';
while ~strcmp(str,'stop')
...
str = ...
end
카테고리
도움말 센터 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!