Index: mttroot/mtt/bin/trans/m/mtt_stime.m ================================================================== --- mttroot/mtt/bin/trans/m/mtt_stime.m +++ mttroot/mtt/bin/trans/m/mtt_stime.m @@ -33,12 +33,14 @@ args=sprintf("%i",i); for j=1:length(theta) args = sprintf("%s %g",args, theta(j)); endfor - command = sprintf("./%s_ode2odes.out %s > mtt_data.dat\n", system_name, args); - system(command); + ## Run system and replace NaN by 1e30 -- easier to handle + command = sprintf("./%s_ode2odes.out %s | sed \'s/NAN/1e30/g\' >mtt_data.dat\n", \ + system_name, args); + system(command); ## Retrieve data load -force mtt_data.dat y_theta = [y_theta mtt_data(:,3:2:1+ny)]; endfor