- On 18 Feb 2001 at 18:42:02, Barry Koplowitz (barry.koplowitz.-a-.bms.com) sent the message

Back to the Top

The following message was posted to: PharmPK

I have a question about writing a defferential equation in the

kinetic basic:

usually the equation is of the form

Sub Deriv (Byval t as double)

DZ1 = -Z1*k12

but how do you write a simular eqation were the expression on

the right has time in it (i.e.)

dz/dt = -k12*z*f(t)

thanks

Barry Koplowitz - On 18 Feb 2001 at 22:15:50, Nick Holford (n.holford.-at-.auckland.ac.nz) sent the message

Back to the Top

The following message was posted to: PharmPK

Barry,

f(t) is usually the solution to another equation in the system. The

exact syntax depends on the way your de solver works. e.g. in NONMEM

for a 2 cpt model:

DADT(1)=A(2)*K21-A(1)*K12-A(1)*K1O

DADT(2)=A(1)*K12-A(2)*K21

In this case the vector A() contains the solutions to the

differential equations whose derivatives are stored in the vector

DADT(). You can think of A() as being equivalent to f(t).

The DE solver may also allow you access to its integration variable

representing the current time (e.g. it may be called t). In this case

you can directly write your own f(t).

--

Nick Holford, Divn Pharmacology & Clinical Pharmacology

University of Auckland, 85 Park Rd, Private Bag 92019, Auckland, New Zealand

email:n.holford.-a-.auckland.ac.nz tel:+64(9)373-7599x6730 fax:373-7556

http://www.phm.auckland.ac.nz/Staff/NHolford/nholford.htm - On 20 Feb 2001 at 12:11:36, "Dan Hirshout" (dhirshout.-a-.innaphase.com) sent the message

Back to the Top

The following message was posted to: PharmPK

There are two ways to do it.

1. You can write the expression, f(t), directly to the differential

equation.

2. You can define an another term, for example, C=f(t),

and define

dim C as double at the beginning of the program

and then in the differential equation, use C instead of f(t)

Regards,

Dan Hirshout

Want to post a follow-up message on this topic? If this link does not work with your browser send a follow-up message to PharmPK@boomer.org with "Writing differential equation is Basic editor" as the subject

PharmPK Discussion List Archive Index page

Copyright 1995-2010 David W. A. Bourne (david@boomer.org)