Fix average

This commit is contained in:
Ian Jauslin 2024-02-20 10:46:53 -05:00
parent c284587105
commit f9171aa355
1 changed files with 2 additions and 2 deletions

View File

@ -136,8 +136,8 @@ int lyapunov(
// average lyapunov
for(i=0; i<MATSIZE; i++){
// exclude inf
if(! isinf(lyapunov[i])){
lyapunov_avg[i]=lyapunov_avg[i]*prevtime/time+lyapunov[i]*(time-prevtime)/time;
if((! isinf(lyapunov[i])) && (time>starting_time)){
lyapunov_avg[i]=lyapunov_avg[i]*(prevtime-starting_time)/(time-starting_time)+lyapunov[i]*(time-prevtime)/(time-starting_time);
}
}