Quantcast
Channel: Latest Discussions - COMSOL Forums
Viewing all articles
Browse latest Browse all 26527

tic/toc in matlab for COMSOL

$
0
0
I have a model inside a for loop and occasionally it runs into an extreme parameter value and I want to just skip that iteration. I tried increasing the interations a lot and then saying skip the iteration after a much longer time but it does not work, my syntax was:

timerID=tic;
model.sol('sol1').runAll;
if toc(timerID) > 120
continue
end

This did not work. Does anyone know if there is anyway to stop a runAll and move onto the next parameter value based on some condition?

Thank you

Viewing all articles
Browse latest Browse all 26527

Trending Articles