Skip to content
Snippets Groups Projects
Commit 467cc207 authored by Sander Mathijs van Veen's avatar Sander Mathijs van Veen
Browse files

Merged

parent 1535dd83
No related branches found
No related tags found
No related merge requests found
......@@ -37,13 +37,11 @@ int Euler(double t0, double t1, double dt, double *y0, double *y1, int N,
puts("Error calculating slope.");
return -1;
}
printf("%.12e: %.12e,%.12e\n", t, y1[0], y1[1]);
for( i = 0; i < N; i++ )
y1[i] = y1[i] + dy[i] * dt;
// Value can be printed/logged here
printf("%.12e: %.12e,%.12e\n", t, y1[0], y1[1]);
logger(t, N, y1);
}
......@@ -132,7 +130,6 @@ int RungeKutta4(double t0, double t1, double dt, double *y0, double *y1, int N,
}
// Value can be printed/logged here
printf("%.12e: %.12e, %.12e\n", t, y1[0], y1[1]);
logger(t, N, y1);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment