Azzera filtri
Azzera filtri

Skip for loop iteration if it takes too long to run

2 visualizzazioni (ultimi 30 giorni)
Hi,
I have a for loop and within that loop I have a numerical optimisation function which converges 99% of the time but in some iterations, it does not and that iteration keeps running with no termination. I want to skip an iteration which takes too long to run. For eg, move to the next iteration if the if the current iteration has already been running for 5 mins but has not yet terminated. I thought of using tic toc but that requires the numerical optimisation function to terminate in order to get the time elapsed. Any ideas as to I can solve this?

Risposte (0)

Categorie

Scopri di più su Loops and Conditional Statements in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by