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
Stephen23 2018년 4월 25일

0 개 추천

str = '';
while ~strcmp(str,'stop')
...
str = ...
end

카테고리

도움말 센터File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

질문:

2018년 4월 25일

답변:

2018년 4월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by