matlab get stop executing while loop for no reason
Ältere Kommentare anzeigen
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 Kommentare
Weird Rando
am 4 Mai 2016
Bearbeitet: Weird Rando
am 4 Mai 2016
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
am 4 Mai 2016
Jan
am 4 Mai 2016
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
am 4 Mai 2016
Print your maxfval and see if it ever gets smaller than the epsilon. If not, increase the epsilon.
meriame
am 4 Mai 2016
CS Researcher
am 4 Mai 2016
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
am 4 Mai 2016
CS Researcher
am 4 Mai 2016
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.
Antworten (0)
Kategorien
Mehr zu Introduction to Installation and Licensing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!