help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gsl] Another question on GSL ODE Solvers...


From: Michael
Subject: [Help-gsl] Another question on GSL ODE Solvers...
Date: Wed, 6 Jun 2007 02:24:31 -0700

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]