A question about ode "rkf"

Bouchra Bensiali bouchra.bensiali at yahoo.fr
Fri Apr 30 16:21:41 CEST 2010


Hi,

I wonder if the "rkf" method uses a fixed number of intermediate times as said here http://math.fullerton.edu/mathews/n2003/RungeKuttaFehlbergMod.html.

For example, if I define a function F:
--
function Xdot=F(t,X)

  //printf("t=%f \n",t)
  
  Xdot = ... ;
  
endfunction;
--
and make a first integration:
--
pas_temps = 0.001;
t0 = 170*pas_temps;
tf = 180*pas_temps;

X0 = ... ;

Trajectoire1 = ode("rkf",X0,t0,t0:pas_temps:tf,F);
--
and a second integration beginning with the result obtained at time t=0.178 (for example):
--
t0 = 178*pas_temps;
tf = 180*pas_temps;

X0 = Trajectoire1(:,9);

Trajectoire2 = ode("rkf",X0,t0,t0:pas_temps:tf,F);
--
then is Trajectoire2 supposed to be the same as Trajectoire1(:,9:11)?

Because I have an example that gives different results and found (by using printf("t=%f \n",t)) that the number of intermediate times changed from one integration to another.

Thank you in advance for your help. I'm really stuck.


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20100430/aba7ce5d/attachment.htm>


More information about the users mailing list