Problem involving drug delivery and ODE

4 views (last 30 days)
Garrett
Garrett on 27 Feb 2014
Commented: Arthur Goldsipe on 28 Feb 2014
I am trying to model drug delivery over time using ODE45 to simultaneously solve three differential equations, and it is giving me an exponential decay function, which is what I want. However, I am now trying to model extra doses being applied to the system. For example, I want to increase the concentration of the drug by a set amount at a certain time interval while having the exponential decay still apply. Basically, I want it to look like this:
What can I do to accomplish this?

Answers (2)

Star Strider
Star Strider on 27 Feb 2014
See odeset and particularly the Event Location Property section. An events function will allow you to stop the integration according to specific criteria, change something, then restart the integration.
In your pharmacokinetics application, you can do this either with respect to time or drug concentration.

Sean de Wolski
Sean de Wolski on 27 Feb 2014
Have you tried using SimBiology?
Perhaps this webinar could get you started.
  1 Comment
Arthur Goldsipe
Arthur Goldsipe on 28 Feb 2014
Yes, SimBiology is designed just for this sort of problem. You can write your model in terms of reactions instead of ODEs and doses instead of events. If you have access to SimBiology and want to see how to translate this problem into a SimBiology model, please post another question on MATLAB Answers. It should just be a few lines of code.

Sign in to comment.

Categories

Find more on Scan Parameter Ranges in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!