Pharmacokinetics: repeated oral dosing Open ↗
Code
% One-compartment model, 500 mg every 8 hours (sum of Bateman curves)
ka = 1.2; ke = 0.25; % absorption and elimination rates (1/h)
D = 500; V = 40; F = 0.8; % dose (mg), volume (L), bioavailability
tt = linspace(0, 72, 1500);
C = zeros(size(tt));
for td = 0:8:64
d = tt - td;
C = C + (d > 0) .* (F*D*ka / (V*(ka - ke))) .* (exp(-ke*d) - exp(-ka*d));
end
fill([0 72 72 0], [4 4 10 10], [0.55 0.8 0.55], 'FaceAlpha', 0.2)
hold on
plot(tt, C, 'LineWidth', 2)
yline(4, 'k:', 'minimum effective')
yline(10, 'r:', 'toxic')
hold off
xlabel('time (h)'), ylabel('plasma concentration (mg/L)')
title('Repeated dosing settles into the therapeutic window')