フィルターのクリア

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