|
"Roger Stafford" wrote in message <jh750f$non$1@newscl01ah.mathworks.com>...
> "Chris Sorrento" wrote in message <jh6p02$k21$1@newscl01ah.mathworks.com>...
> > I need to solve differential equations:
> > 3 equations:
> > dX/dt = MX-kX
> > dS/dt = DS0 - (MX/Y)
> > dP/dt = AdX/dt + BX
> > the 4th and 5th equations are
> > dM/dX = Mmax.S/kX+S
> > dM/dS = Mmax.S/kX+S
> > So, the first 3 equations are with respect to time and the 4th and 5th equations are with respect to one of the 3 variables that are solved wrt time. If I were to solve only the first 3 equations, I know how to write the code and solve using ODE45. But how do I incorporate the 4th and 5th equations? All of these need to be solved simultaneously. Could you guide me to any help files?
> - - - - - - - - -
> You have one too many differential equations! You can write the 4th and 5th equations as:
>
> dM/dt = (Mmax.S/kX+S)*dX/dt = (Mmax.S/kX+S)*(MX-kX) =
> dM/dt = (Mmax.S/kX+S)*dS/dt = (Mmax.S/kX+S)*(DS0-(MX/Y))
>
> This requires a dependency between the quantities on the right hand side. If these variables do satisfy this equality, then you really only need four of the equations. If they don't, you have an impossible requirement.
>
> Roger Stafford
Thank you Roger for your response. I spent some time on your suggestion. It works. I converted as follows:
M(X, S) = (dM/dX * dX/dt) + (dM/dS * dS/dt)
Thanks for pointing me in the right direction.
|