Back to the Top
[Various replies - db] From: "A.J.Macdonald"
Date: Fri, 28 Nov 1997 14:27:48 +0000
Subject: Experience with MATLAB
I have been using Matlab for PBPK modelling. Using the GUI add-on
Simulink, differential equations can be modelled and linked easily.
They can be represented in transfer function or state space form, or
you can model the equations yourself.
Two stiff system algorithms are available with Simulink, Gear and Linsim.
Runge Kutte23 and 45, Adams and Euler algorithms are also available.
There is a Systems Identification toolbox for parameter estimation and
a Statistics Toolbox that provides methods for parameter sensitivity
analysis and optimization. There are a couple of IEEE papers that will give
you some idea of Matlabs capabilities.
Wada, D.R., Ward, D.D. (1994), "The hybrid model: a new
pharmacokinetic model for computer-controlled infusion pumps," IEEE
Transactions on Biomedical Engineering., vol. 41, No. 2.
Wada, D.R., Stanski, D.R., Ebling, W.F. (1995), "A PC-based graphical
simulator for physiological pharmacokinetic models", Computer Methods
and Programs in Biomedicine., vol. 46, pp. 245-255.
Hope this helps
Dept of Medicine and Pharmacology and
Dept of Automatic Control and Systems Engineering
University of Sheffield
Tel. (01142) 225608
Fax. (01142) 731729
Date: Fri, 28 Nov 1997 15:14:43 +0000
From: "Russell Wada"
Subject: Experience with MATLAB
Comments: Authenticated sender is
I have used MATLAB/SIMULINK for many things, have found it an easy
tool to use for modeling and simulation, and have not felt limited by the
Some examples: (1) population PKPD estimation - linearization methods, global
two-stage (2) optimal sampling (3) PBPK modeling and simulation (4) nonlinear
feedback control (5) ANOVA (6) EEG signal processing
MATLAB is a command-line, interpretive, matrix-based language with
scripts. It has good graphics and reasonable data handling capabilities.
simple things, the user can interact at the command line. To do more
complex things, the user needs to write equations in the MATLAB language,
store the equations in user-defined subroutines, and call
user-defined subroutines or built-in subroutines where needed.
MATLAB can do linear ODE's.
MATLAB is a general-purpose tool. It has no specific tools for
pharmaceutics, as an example.
To be useful for PKPD applications requires extra MATLAB toolboxes.
I have used the toolboxes for Optimization, Splines, Control, and
Signal Processing. I would like the toolbox for Stats, although the
basic tools are present in the standard package (i.e. F-distributions)
I have found SIMULINK to be very useful for nonlinear simulation, although
is also an extra package. SIMULINK is a graphical simulator, with
about 6 different integration routines (i.e. gear, rk45). SIMULINK models
can be simulated from the graphical simulator window, or the command-line.
I find the latter more useful, because it allows, for example,
parameter estimation and Monte-Carlo simulation.
SIMULINK models are saved as MATLAB files. Thus if one needs to
write a general ODE which cannot be expressed in SIMULINK, then one
can (probably) write the MATLAB file directly. I think that SIMULINK
files are still needed to simulate the ODE.
Some limitations of MATLAB 4.0 are: (1) User needs familiarity with
matrices, and engineering/applied math concepts;
(2) Previous experience with language such as C/FOrtran;
(3) Sometimes simulator doesn't give proper results (stiff PBPK
models) Needs careful attention to choice of algorithm/simulation
parameters. (4) difficult to handle discrete events.
D. Russell Wada
299 California Ave, Suite 300
Palo Alto CA 94306
Ph: (650) 462-5607
Fx: (650) 462-5610
Date: Fri, 28 Nov 1997 10:03:58 -0800
From: "Traub, Richard J"
Subject: PharmPK Experience with MATLAB
Paul Damian asks:
Can anyone tell me if MATLAB is a good tool for modeling
of differential equations based on their experience with
In my work I use MATLAB and SIMULINK to model the transport of
radionuclides in the body.
A current project is to calculate the exhalation rate of Rn-220
(Thoron) following an inhalation of thorium oxide. (a later task will
be to calculate the radiation doses) To do this I have implemented what
I call a six stage hybrid biokinetic model. I model the kinetics of
each nuclide starting with Th-232 explicitly (thus six stages), the
first 5 nuclides are modeled using the biokinetic models recommended by
the ICRP while the biokinetic model for thoron is a model described by
Peterman for inert gases (thus a hybrid model). All totaled, the model
contains about 350 compartments. The model is stiff (transfer
coefficients between the compartments range over 9 orders of magnitude,
the half-life of Th-232 is on the order of 10^10 years and the half life
of thoron is 55 sec.).
So far as I can tell, the MATLAB/Simulink combination is
working well. MATLAB allows the user to choose which differential
equation solver to use both stiff and nonstiff solvers. In my opinion,
MATLAB is very powerful and is capable of doing just about anything you
want it to.
For simple pharmacokinetic systems, you would not need to use
Simulink but then you would need to write your own MATLAB routines that
describe the differential equations and the jacobian (Simulink does that
for you). The nice thing about Simulink is that it provides a nice
graphical tool to build compartmental systems such as you find in
pharmacokinetics. You can "build" a single compartment and then
replicate the compartment and connect the compartments using a line
If you use MATLAB and don't want to write your own routines for
optimization, probability distributions, etc. you will probably need to
add various MATLAB toolboxes. So you might want to get Matlab,
Simulink, the optimization tool box, the statistics toolbox, and
perhaps, the splines toolbox. All of which add to the cost. The
learning curve for MATLAB and Simulink is steep, and in my opinion the
manuals that come with MATLAB are not as helpful as they might be.
Hope this helps.
All disclaimers apply
To: PharmPK.aaa.pharm.cpb.uokhsc.eduBack to the Top
Unfortunately I have not used METLAB but I have been using a similar program
called MathCad for the same purpose as you describe. I have not seen these
types of programs used in pharmacokinetics and feel there is a large potential
for their use. I have used MathCad to solve differential equations resulting
from compartment model. Included are functions to solve stiff equation,
Fourier transform, nonlinear regression anaylsis, convolution and
deconvolution, Symbolic solver for example: Laplace transform, integration and
differential equations, all of which I've applied to pharmacokinetic problems.
I am really happy to see others are applying programs like METLAB and MathCad
to the field of pharmacokinetics.
Best Of Luck
Back to the Top
Many thanks to all of you who responded to my request for information
about MATLAB. I believe David Bourne has posted most of the replies to
the list. I found the information very helpful.
Paul Damian PhD,MPH
Rust Environment & Infrastructure
PharmPK Discussion List Archive Index page
Copyright 1995-2010 David W. A. Bourne (email@example.com)