How to force maltab to continue with next value of for loop index if it encounters NaN or infinity in the present loop.
1 view (last 30 days)
I have created an automate script to ease my pains of running my simulink simulation again and again manually. I pass the value to the simulink in each loop and let it run and save the generated graphs in a directory of my own. My problem is that the loop terminates abruptly whenever simulink encounters NaN! So, instead of taking the next loop index, it comes out of the loop prematurely without even completing all the indices over which for loop is running. Kindly help me. This is my very simple automate script:
f = figure('visible','off');
set(f, 'Position', get(0, 'Screensize'));