Hello, About your question > I want to solve the system of ODEs at 5, 7, 9, 11 seconds, and I > only want solutions at these points. How to do that?
In GSL manual there is something i think directly addresses your problem: http://www.gnu.org/software/gsl/manual/html_node/ODE-Example-programs.html ------------------------------------------------------------------------ To obtain the values at regular intervals, rather than the variable spacings chosen by the control function, the main loop can be modified to advance the solution from one point to the next. For example, the following main loop prints the solution at the fixed points t = 0, 1, 2, \dots, 100, for (i = 1; i <= 100; i++) { double ti = i * t1 / 100.0; while (t < ti) { gsl_odeiv_evolve_apply (e, c, s, &sys, &t, ti, &h, y); } printf ("%.5e %.5e %.5e\n", t, y[0], y[1]); } -------------------------------------------------------------------------- Hope it helps :) ----------------------------------------------------------------------- Perikles Rammos Section of Astrophysics, Astronomy & Mechanics Department of Physics, University of Athens Panepistimiopolis, 157 84 Zografos Athens, GREECE Tel. 00 30 - 210 - 7276864 email: [EMAIL PROTECTED] ----------------------------------------------------------------------- _______________________________________________ Help-gsl mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gsl
