Question: Complete the code Write a MATLAB script to solve our nonhomogeneous drug - delivery problem using ode 4 5 . Recall that our model is

Complete the code
Write a MATLAB script to solve our nonhomogeneous drug-delivery problem using ode45. Recall that our model is represented as:
dDdt=-(ka+kd)D+rD0e-rt
dBdt=kaD-kmB
dWdt=kdD+kmB
Solve for the Timed-Release Capsule input function: f(t)=D0(1-e-rt) over the time 0t360min.
Make sure that the solutions output from ode45 is stored to a vector Y
Script?
1% Define constants:
2ka=0.025; 3kd=0.005
3,kd=0.005;
4,km=0.015;
5D0=50;
D0=50; r=0.1151
- absorption rate
%(min^-1- digestion rate)
- metabolic rate)
%mg- initial dose %(min??-1)- Drug release rate
% Define the anonymous function odefun to represent the system of THREE ODEs to be solved
% Solve the system of three equations using ode45 for all points in time vector, t :
t=linspace(0,6**60,2000);
% Here your ode45 output should include the solutions array named Y(see code below for how Y is used) later
% Plot solutions:
D=Y(:,1); B=Y(:,2);
B=Y(:,2); W(:,3);
fig = figure;
fig.Name = 'Numerical Approach'; fig.Color ='w';
plot (t,D, t, B, t,w,' linewidth ',1.5);
xlabel('time (min)'); ylabel('Amount of Drug (mg)'); title('Timed Release Capsule');
ax= gca; ax.FontSize =11
L = legend('D(t)','B(t)','W(t)', 'orientation ', 'vertical'); L. FontSize =11;
 Complete the code Write a MATLAB script to solve our nonhomogeneous

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!