Wang Long schrieb: > Hi, > > When I was running this in octave: > > t_in = [0 0.05 0.13 0.19]; > [t_out, y] = ode45 (@(t,x) x, t_in, 1); > > I got t_out=[0.00000 0.05000 0.10000 0.15000 0.19000]. While the > length of t_in is 4, I found that of t_out is 5 instead of 4. However > the length of t_in and t_out should be identical. This bug also exists > in ode23, ode54, ode78, etc. > > I'm using octave on Ubuntu, and the file "ode45.m" belongs to the > package "octave-odepkg" version 0.6.0-1. > > Any ideas? Thank you all. > > Regards, > Wang Long
Hi Wang, please change line number 406 (file ode45.m) originally from vstepsize = vslot(1,vcntloop-1) - vslot(1,vcntloop-2); into vstepsize = vslot(vcntloop) - vslot(vcntloop-1); Does this fix the ode45 problem for the 0.6.0 release of the package? At least it seems to fix the problem for the latest sources and the next package that will become available. Thomas ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Octave-dev mailing list Octave-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/octave-dev