help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: implementing a model in Octave


From: Marco Atzeri
Subject: Re: implementing a model in Octave
Date: Tue, 04 Nov 2014 21:40:38 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 11/4/2014 8:50 PM, tessaract87 wrote:
Hi all,

So, my current project is constructing a model that determines the
population dynamics of two types of bacteria (s and p) as a function of the
available nutrients (i,j,w,and y) which in turn affects the growth rates of
s and p (SRB and PS).

The basic form of the equations looks like this:

SRB(i,y)=((V*i)/(KmP+i))*(i/((KmN/PN)+i))*(i/((KmC/PC)+i))*(y/(KmS+y))

PS(i,w)=((V*i)/(KmP+i))*(i/((KmN/PN)+i))*(i/((KmC/PC)+i))*(w/(KmSH+w))

i'=(s+p)*BDR-(SRB(i,y)*s+PS(i,w)*p)
s'=SRB(i,y)*s-(BDR)*s
p'=PS(i,w)*p-BDR*p
y'=SPC*j-SRB(i,y)*SC*s*y
j'=PS(i,w)*SHC*p*w-SPC*j
w'=SRB(i,y)*SC*s*y-PS(i,w)*H*p*w

(BDR, H, SC, SCH and Km* and P* are all constants).

I'm trying to figure out what the best way to implement this model in Octave
is- should I just create a bunch of nested functions and run lsode on each
of them, or is there a simpler/more elegant way of doing this type of model
in Octave?

use vectors and lsnode

i -> x(1)
s -> x(2)
p -> x(3)
y -> x(4)
j -> x(5)
w -> x(6)

Any suggestions or advice is appreciated.  Thanks!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]