Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
The case of the odd case statement
조회 수: 1 (최근 30일)
이전 댓글 표시
So I entered the following code and tried it with the dispaly(r) either commented out or not. Its just trying to try all case statement cases
Both ways seemed to behave wrong. See for yourself.
daylight = 1; while daylight whatever=1; while whatever r = fix(2.99 *rand) + 1; % n=1..3 %display(r); switch r case r==1 if whatever display('case 1'); end case r==2 if whatever display('case 2'); end otherwise display('otherwise'); whatever=0; end end end
% GO Figure! What am I doing wrong?
댓글 수: 1
Jan
2011년 8월 17일
Please format your code, see: http://www.mathworks.com/matlabcentral/answers/13205-tutorial-how-to-format-your-question-with-markup
답변 (2개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!