[R] coupled ODE population model
Justin Frank
jtfrank at mta.ca
Fri Jun 12 16:46:59 CEST 2009
I'm fairly new to R, and I'm trying to write out a population model that
satisfies the following;
the system consists of s species, i= 1, 2,...,s
network of interactions between species is specified by a (s x s) real matrix,
C[i,j]
x[i] being the relative population of the "ith" species (0 =< x[i] =< 1,
sum(x[i]=1)
the evolution rule being considered is as follows;
xprime[i] = f[i] if x[i] > 0 or f[i] >= 0
xprime[i] = 0 if x[i] = 0 and f[i] < 0
where f[i] = sum(C[i,j]*x[j]) - x[i]*sum(C[k,j]*x[j])
I have a bit of attempted code written out, but are there any tricks or tips
that would condense or make this mess look nicer?
-Justin
More information about the R-help
mailing list