public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
* Another question on GSL ODE Solvers...
@ 2007-06-06  9:24 Michael
  2007-06-06 13:42 ` Robert G. Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Michael @ 2007-06-06  9:24 UTC (permalink / raw)
  To: help-gsl, gsl-discuss

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-06-06 19:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-06  9:24 Another question on GSL ODE Solvers Michael
2007-06-06 13:42 ` Robert G. Brown
2007-06-06 19:31   ` Michael

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).