struct gsl_odeiv2_system ?
#include<gsl/gsl_odeiv2.h> and gcc -E;
gsl-config --cflags and view.
gsl_blas_dgemm do?
| x1 | -x2 | +2x3 | = | 2 |
| 2x2 | -x3 | = | -1 | |
| x1 | +x2 | +3x3 | = | 3 |
gsl_linalg_LU_decomp
gsl_linalg_LU_solve
or via QR-decomposition using the GSL functions
gsl_linalg_QR_decomp
gsl_linalg_QR_solve
See
Consider the Lotka-Volterra equations (predator-prey equations) (from Numerisk Fysik 2011) (look it up in Wikipedia),
| dr/dt | = | r(α-βf) |
| df/dt | = | -f(γ-δr) |
gsl_odeiv2_system.function .
struct my_params {double alpha,beta,gamma,delta;};
int lotka(double t, const double y[], double dydt[], void* params){
struct my_params p = *(struct my_params *)params;
dydt[0]= y[0]*(p.alpha-p.beta*y[1]);
dydt[1]=-y[1]*(p.gamma-p.delta*y[0]);
return GSL_SUCCESS;
}