Question
ANSWER PART B, I HAVE PART A.

MATLAB ONLY!! WRITE IN COMPUTER SO I CAN COPY PASTE!! The student must use the following case provided and apply most of the

5:39 Facebook al Hey, Note: Brother if you have any queries related the answer please do comment. I would be very happy to r
0 0
Add a comment Improve this question Transcribed image text
Answer #1

EXPLANATION:

Here the concentration values(Cp) along with time interval for 0,4,8,12,16 are also displayed along with the plot of Cp vs t for 24 Hours.

continue statement is used to omit formulated(as per question) Cp values for interval (t) 20 and 24 or for the value of i 6 and 7.

here set(gca,'XTick',t); command is used to give x axis with intervals 0, 4, 8, 12, 16, 20 and 24

clc
clear all
close all
Dg=150;
Vd=50;
ke=0.4;
ka=1.6;
t=0:4:24;
i=1;
t1=0;
fprintf('Concentration of Drug in body:\n');
for i=1:length(t)
if(i>5)
% as at regular interval of 4hours, 4 more does are administered
% after first dose given at t=0
% So, total 5 doses are given at t=0,4,8,12,16 time interval
% after that no does is given.So,concentration of drug is taken for
%last 2 intervals of t=20 ,24 as 0.Because final plot will be taken
%as t(0:4:24) vs cp.So for last 2 intervals plot requires value for
%cp.
Cp(i)=0.0;
% as alrady all doses are given,so continue statement move the flow
%control to for loop and increnent the value of i.
continue;
end
if(i<=5)
% insert dose concentration details in array for interval
% t=0,4,8,12,16
Cp(i)=(Dg/Vd)*(ka/(ka-ke))*(exp(-ke*t(i))-exp(-ka*t(i)));
% print t and Cp value
fprintf('t = %d : %f \n ',t(i),Cp(i));
end

end
% plot graph for t=24 hours and Cp with blue line plotting
t=0:4:24;
plot(t,Cp, 'blue')
%x axis labeling
xlabel('t(interval)-->')
%y axis labeling
ylabel('Cp(Concentration)-->')
% set x axis values from 0 to 24 at regular interval of 4
set(gca,'XTick',t);
%x graph title
title('Concentration(Cp) and time interval(t) plot ')
fprintf('\n');

SCREEN SHOT

clc clear all close all Dg=150; Vd=50; ke=0.4; ka=1.6; t=0:4:24; i=1; t1=0; fprintf(Concentration of Drug in body:\n); for

if(i<=5) * insert dose concentration details in array for interval t=0,4,8,12,16 Cp (1) = (Dg/Va) * (ka/ (ka-ke)) * (exp(-ke*

OUTPUT

Concentration of Drug in body: t = 0: 0.000000 t = 4 : 0.800940 t = 8: 0.163038 t = 12 : 0.032919 t = 16 : 0.006646

- OX Figure 1 File Edit View Insert Tools Desktop Window Help OHSAS E DO Concentration(Cp) and time interval(t) plot Cp(Conce

Add a comment
Know the answer?
Add Answer to:
ANSWER PART B, I HAVE PART A. MATLAB ONLY!! WRITE IN COMPUTER SO I CAN COPY...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT