From: Olaf T. <i7...@t-...> - 2012-09-05 10:11:21
|
Hi Davide, On Wed, Sep 05, 2012 at 11:07:27AM +0200, davide prandi wrote: > ... > In particular:1) I use "dfxpdp.m" (optim package) for the Jacobian > computing. It works, but it accepts equations in F(Y,t) form, and > all the ode solvers require equations in form F(t,Y). There is a way > to redefine F, swapping the dependent/independent variable? > ... There is, using anonymous functions. E.g., call dfxpdp this way: ... = dfxpdp (t, Y, @ (a, b) F (b, a)); If you are using an anonymous function anyway, you can even spare one level of indirection (occuring within dfxpdp) and use dfpdp instead: ... = dfpdp (Y, @ (a) F (t, a)); Regards, Olaf -- public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net |