Another question on GSL ODE Solvers...

Michael comtech.usa@gmail.com
Wed Jun 6 09:24:00 GMT 2007


HI all,

If I want to vary the parameters "mu" with 10000 different values. Do
I really have to


for i = 1:1000

{

mu=Parameters(i);

gsl_odeiv_system sys = {func, jac, 2, &mu};

double t = 0.0, t1 = 100.0;
       double h = 1e-6;
       double y[2] = { 1.0, 0.0 };

       while (t < t1)
         {
           int status = gsl_odeiv_evolve_apply (e, c, s,
                                                &sys,
                                                &t, t1,
                                                &h, y);

           if (status != GSL_SUCCESS)
               break;

           printf ("%.5e %.5e %.5e\n", t, y[0], y[1]);
         }

}

----------------------------------------

Is there a way to make things easier because I really only vary the
one of the parameters and nothing else changed at all, and I solve the
equation at the same time points t=5, 7, 9, 11.

Thank you!

MIchael.



More information about the Gsl-discuss mailing list