Closed yuyichao closed 9 years ago
Actually, it seems that the only part that uses Polynomial (ode_ms
, order > 4) never works ever since it is added back when it's still in the main repo. The b
in this path is never defined and as far as I can see, it is also trying to increase the size of an array by assigning to out-of-bound index (the matlab way) which shouldn't work now, if it ever did.
Please correct me if I missed sth.
Thanks, that seems correct. We don't seem to have a test case for this either - we only test the exported ode4ms
, which uses order=4
...
It seems that in order to fix this, one would have to figure out what b
should be, probably from the literature, but the most relevant section of Wikipedia I can find doesn't say much about higher-order methods. Of course, a quick "fix" would be to just explicitly drop support for higher orders until someone has the time to implement them...
Maybe @pao would care to comment on where the code originally came from, and whether it's possible to make it work again?
@tlycken it turns out that it is not that hard to make it works (see the Pull request). The expression used for the higher order coefficient is almost correct and just need some minor tweak. The wiki page actually have the expression for higher order coefficient in the (the one with a integral) and I believe it is the same way used in the code as well.
Also, for the API used in ODE.jl, Polynomials.jl and Polynomial.jl are identical and the test passes with both dependencies.
Fixed in #51
Polynomial.jl is deprecated in favour of Polynomials.jl. Maybe ODE.jl should convert the dependencies as well?