matlab get stop executing while loop for no reason
이전 댓글 표시
Hello everyone:
I am facing a strange problem with Matlab. I have a while loop that should execute optimization function "fminmax". The problem is that suddenly the program stop working it is like it froze. It does not finish the execution, it does not end it also, nothing..as shown in figure bellow.

Does anyone here have an idea why this happen????
Thank you in advance.
댓글 수: 9
Weird Rando
2016년 5월 4일
편집: Weird Rando
2016년 5월 4일
You're just stuck in an infinite loop. Chance are that the variable may not be meeting the condition you set for the while loop.
meriame
2016년 5월 4일
Jan
2016년 5월 4일
The screenshot does not contain any useful information. Please restart Matlab and/or the computer to check, if the problem is reproducible. If so, post the relevant part of the code. Perhaps you only requested a rand(1e6) and the computer stalls while trying to reserve a 10 TByte array.
CS Researcher
2016년 5월 4일
Print your maxfval and see if it ever gets smaller than the epsilon. If not, increase the epsilon.
meriame
2016년 5월 4일
CS Researcher
2016년 5월 4일
What is the error message? Have you initialized j somewhere in the code? Also, there should be a ';' between maxfval=abs(maxfval) and j=j+1
meriame
2016년 5월 4일
CS Researcher
2016년 5월 4일
Well then it seems that maxfval becomes smaller than epsilon in the first run. Try changing epsilon. It would be easier for me to understand if you can share the entire code.
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!