Problem occurs with the infinite loop
Show older comments
I am working with many for loops. So I can't detect which syntax leads to infinite loop.
My query is "I am getting a plot while breaking the loop. Could the plot be accepted as a correct answer?"
7 Comments
the cyclist
on 11 Mar 2021
Edited: the cyclist
on 11 Mar 2021
Try to imagine you are someone else reading this forum, and the only thing you know about your problem is what you have written here.
Maybe that will help you realize that you have not given us enough information to help. Not even close to enough information.
REEMA MOHANTY
on 11 Mar 2021
Jan
on 11 Mar 2021
Nested FOR loops cannot cause an infinite loop. Only WHILE loops can be infinite.
How is the term "acceptable" defined in your case? There is no unique definition. Maybe to substantianl advance in the last 100 iterations?
REEMA MOHANTY
on 11 Mar 2021
REEMA MOHANTY
on 12 Mar 2021
Jan
on 12 Mar 2021
Use the profile comamnd to find the bottlenecks of your code. If symsum is slow, there is not magic trick to increase the speed.
REEMA MOHANTY
on 15 Mar 2021
Answers (0)
Categories
Find more on Particle Swarm in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!