search for: rkmethod

Displaying 2 results from an estimated 2 matches for "rkmethod".

2012 Mar 02
0
?Syntax on Taking differential on both sides of the equation in 'R'
...t;-(f*Seq1*Veq1+g*Ieq1+r*(1-Neq1)-b1*Veq1*Ieq1)/(b2+m+d+g) Ieq1<-(-b2*Ceq1)-r*(1-Neq1)/(b1*Veq1-g-u) Veq1<-o*(Ceq1+Ieq1)/e I want to take the differential of both sides of the equation and then solve for the inverse of the first as follows (the parameter values are made up): library(deSolve) rkMethod("rk45dp7") CSIeq1<-function(t,yeq1,pars) { with (as.list(c(yeq1,pars)),{ Neq1<-Seq1+Ceq1+Ieq1 dSeq1<-d[a*(1-Neq1)/(f*Veq1+m+d)] dCeq1<-d[(f*Seq1*Veq1+g*Ieq1+r*(1-Neq1)-b1*Veq1*Ieq1)/(b2+m+d+g)] dIeq1<-d[(-b2*Ceq1)-r*(1-Neq1)/(b1*Veq1-g-u)] dVeq1<-d[o*(Ceq1+Ieq1)/e] retur...
2010 Sep 16
1
More accurate ODE solver?
Dear All, I was using rk4 and lsoda to solve a ODE system. However, both of them gave bad accurate solutions, especially compared with Matlab solver ODE45. For example, ODE45 gave solutions that can go to a stable level (about 1.6) when time goes to infinity, however, the solutions from lsoda are decreasing to very very small (about 1e-130) numbers. Does R have more accurate ODE solvers as