How to enter an input in an active 'while' loop?
이전 댓글 표시
Hi everybody,
I want to 'break' a 'while' loop when an input gets a specific value. Unfortunately, I don't know why when I change the input value, (when 'while' loop is executing), the 'while' loop doesn't recognize! this change?
Please guide me..
Thanks, David
채택된 답변
추가 답변 (2개)
Oleg Komarov
2011년 7월 4일
x = 1;
while x == 1
x = input('Value for x: ');
end
David Mason
2011년 7월 9일
0 개 추천
댓글 수: 1
Oleg Komarov
2011년 7월 9일
instead of x == 1 you can verify that the button has been pushed.
카테고리
도움말 센터 및 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!