Matlab Exercise 1.2 Help

Description:

Matlab Exercise 1.2 refers to the initial value problem (1.6) from the text, that is,

(    ′
|||   y (t) = - ay (t)
{   z′(t) = ay (t) - bz(t)

|||(   y(0) = y0
    z(0) = z0

where y(t) and z(t) represent the concentration of DRUG Y at time t minutes in the GI tract and the bloodstream respectively. The positive parameter a represents the absorption rate of DRUG Y into the bloodstream, and the positive parameter b represents the rate at which DRUG Y is eliminated from the blood. The initial condition y0 represents a concentration of DRUG Y in milligrams that initially enters the GI tract due to the digestion of a tablet, and z0 represents an initial concentration of DRUG Y in milligrams in the bloodstream.

In addition, the exercise considers the effect imperfect measurements of the rate constants and initial concentrations have on the model. To this end, a second initial value problem called IVP (1.6) with small errors in measurements is included in the GUI.

(
|   y2′(t) = - a2y2(t)
||{     ′
    z2(t) = a2y2(t) - b2z2(t)
||   y2(0) = (y2)0
|(
    z2(0) = (z2)0

where y2(t) and z2(t) represent the concentration of DRUG Y at time t minutes in the GI tract and the bloodstream respectively in the presence of small errors in the measurement of the initial concentrations and rate constants. In practice, the size of the errors are determined by the measurement device.

This graphical user interface (GUI) will compare the solutions to IVP (1.6) and IVP (1.6) with small errors in measurements by plotting y(t) and y2(t) on the same axis and z(t) and z2(t) on a separate axis. This GUI is intended to answer the questions in Matlab Exercise 1.2.
Instructions:

To use the GUI, you must input the 4 rate constants, 4 initial conditions and the total time the concentration of the drug will be measured. To input any of the 9 model parameters, simply click on a particular parameter box and highlight the parameter name.


PIC

Figure 1: Highlight the parameter name, then delete it


Replace the highlighted parameter name with a positive, real constant. Once the inputs have been made,


PIC

Figure 2: All parameters have been defined


click on the ‘Solve’ button in order to see plots of the solutions to IVP (1.6) and IVP (1.6) with small errors in measurements.


PIC

Figure 3: The plot of the solution


Changes to one or all of the parameters can be made by replacing a desired parameter value with another in the same manner described above. To reset the GUI, click the ‘Reset’ button.