필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

While loop doesnt run

조회 수: 2 (최근 30일)
Natalia Wong
Natalia Wong 2016년 1월 1일
마감: MATLAB Answer Bot 2021년 8월 20일
im having problems with my code. if the user enters anything except the value 1 the program should stop but if the user enters 1 the program should continue like in the while loop. But my program stops even if the user enters 1. Pls help Thanks

답변 (1개)

Jan
Jan 2016년 1월 1일
Except for the problem, that I do not have CompTrap and CompSimp, your code runs as expected on my computer.
The message "Program terminated." is confusing. It looks strange, that the code contains the part for the integration twice. But at least nothing stops.
I suggest to use the debugger to step through your code line by line. Then it should be easy to find out, what's going on.
  댓글 수: 2
Natalia Wong
Natalia Wong 2016년 1월 2일
how to use debugger?
Image Analyst
Image Analyst 2016년 1월 2일
Natalia, it will be easier after you look at this: http://blogs.mathworks.com/videos/2012/07/03/debugging-in-matlab/

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by