This is the mail archive of the
gsl-discuss@sourceware.org
mailing list for the GSL project.
Another question on GSL ODE Solvers...
- From: Michael <comtech dot usa at gmail dot com>
- To: help-gsl at gnu dot org, gsl-discuss at sources dot redhat dot com
- Date: Wed, 6 Jun 2007 02:24:31 -0700
- Subject: 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.