search for: diffwrap

Displaying 1 result from an estimated 1 matches for "diffwrap".

Did you mean: diffgap
2012 Jul 03
1
Wrapper function for multivariate arrays for ode
I am trying to to write a wrapper function for the ode solver (under the package desolve) to enable it to take multivariate arrays. I know how to do it for 1 dimension arrays but my code breaks down when I try to do it for 2 dimensional arrays. Here is my code diffwrap<-function(t,y,mu)vdpol(t=t,A[1:3,1:4]<-y[1:12],B[1:12]<-y[13:24],mu=mu) vdpol<-function(t,A,B,mu) { list(c(mu, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, A[1,1], A[2,1], A[3,1], A[1,2],...