Mercurial > repos > public > sbplib
diff +noname/calculateSolution.m @ 36:c6eb3af205c0
Better error handeling in noname.convergence. Better handeling of T=0 in noname.calculateSolution
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 06 Oct 2015 09:51:52 +0200 |
parents | ddfb98209aa2 |
children | 54d3ab296ba0 |
line wrap: on
line diff
--- a/+noname/calculateSolution.m Tue Oct 06 09:48:46 2015 +0200 +++ b/+noname/calculateSolution.m Tue Oct 06 09:51:52 2015 +0200 @@ -22,16 +22,6 @@ % Make sure times are sorted T = sort(T); - % Find out if times to be calulated are integer multiples of the smallest one. - time_multiples = T/T(1); - is_int_multiples = all(time_multiples == int64(time_multiples)); - - if is_int_multiples - fprintf('Calculating time series in increments\n'); - else - fprintf('Restarting for each time in timeseries\n'); - end - orderWidth = findFieldWidth('%d',order); mWidth = findFieldWidth('%d',m); @@ -49,6 +39,17 @@ T(1) = []; end + % Find out if times to be calulated are integer multiples of the smallest one. + time_multiples = T/T(1); + + is_int_multiples = all(time_multiples == int64(time_multiples)); + + if is_int_multiples + fprintf('Calculating time series in increments\n'); + else + fprintf('Restarting for each time in timeseries\n'); + end + % T now contains all the times we need to step to, % if T contained 0 it has now been removed.