This is the mail archive of the gsl-discuss@sourceware.org mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Another question on GSL ODE Solvers...


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]