Hi,
Say you have a function dy/dt = f(y). Then, you would
do the following in code:
// create inner class representing function
Mapping func = new Mapping() {
public double map(double y) {
return f(y);
}
};
int N = 50;
double dt = 0.1;
double[] yValues = new double[N]; // will contain y_i
yValues[0] = y0; // set initial condition
NumericalMath.rungeKutta(yValues, func, dt);
// can now plot yValues to see result
I'll improve the docs for this.
Regards,
Mark
--- lydiacetin <
lydiacetin@...> wrote: > Hi
All,
> I'm hoping someone might be able to help me find a
> java class or
> interface that solves for ordinary differential
> equations using the
> RK4 integration algorithm. I know that the RK4
> algorithm is a method
> given in the JSci API, but I'm not sure how I would
> use it and how I
> set up the parameters. I'm only a beginner with Java
> programming, so
> any information on these topics would be great.
> Cheers
>
>
>
> ------------------------ Yahoo! Groups Sponsor
>
>
> Yahoo! Groups Links
>
>
>
jsci-unsubscribe@yahoogroups.com
>
>
>
____________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html