A 2 compartment PK model

7 views (last 30 days)
Skye Cameron
Skye Cameron on 18 Mar 2021
Edited: Sheida V on 13 Jul 2022
I have the following equations and I am not 100% sure how to start my PK model in the matlab command window? Thanks in advance for any help or advice.

Answers (1)

SaiDileep Kola
SaiDileep Kola on 25 Mar 2021
you can start with the commands described here and example models executed.
  2 Comments
Skye Cameron
Skye Cameron on 25 Mar 2021
Hello, you may be able to help me - I have attached my code below, I am using a matrix in a separate file to use my different data for the code. I have attached firstly my code, then the matrix code in the separate file and then the error message. Are you able to help me solve the error please:)
clear all
close all
%Known parameters
alpha = -4.10e-6; %(1/s)
beta = 1.22e-5; %(1/s)
gamma = -8.1e-6; %(1/s)
k_AK = 5e-7; %(1/s)
%transvascular permeability values of cytotoxic drugs
p_DOX = 3e-6; %transvascular permeability in tumour for DOXIRUBICIN
p_PTX = 7e-9; %transvascular permeability in tumour for PACLITAXEL
p_TMZ = 8e-8; %%transvascular permeability in tumour for TEMOZOLOMIDE
p_BCNU = 7e-7; %transvascular permeability in tumour for CARMUSTINE
%elimination rate values for cytotoxic drugs
ke_DOX = 5.8e-4; %elimination rate for DOXIRUBICIN
ke_PTX = 6.8e-7; %elimination rate for PACLITAXEL
ke_TMZ = 1.06e-4; %elimination rate for TEMOZOLOMIDE
ke_BCNU = 1.1e-4; %elimination rate for CARMUSTINE
%elimination rate for Bevacizumab
ke_BEV = 1.2e-5; %elimination rate for BEVACIZUMAB
%half life
thalf_BEV = 57750; %(s)
thalf_DOX = 1194.8; %(s)
thalf_PTX = 1019917.6; %(s)
thalf_TMZ = 9000; %(s)
thalf_BCNU = 6300; %(s)
%plasma clearance
kclr_BEV = (log(2))/thalf_BEV;
kclr_DOX = (log(2))/thalf_DOX;
kclr_PTX = (log(2))/thalf_PTX;
kclr_TMZ = (log(2))/thalf_TMZ;
kclr_BCNU = (log(2))/thalf_BCNU;
%initial ratio of vessel surface area over tissue volume
sv_bt = 20000; %in brain tumour
sv_nt = 7000; %in normal tissue
%PK model
pkm = PKModelDesign;
pkc1 = addCompartment (pkm, 'Central');
pkc1.DosingType = 'Infusion';
pkc1.EliminationType = 'linear-clearance';
pkc1.HasResponseVariable = true;
pkc2 = addCompartment (pkm, 'Peripheral');
pkc1.DosingType = 'Infusion';
pkc2.EliminationType = 'linear-clearance';
pkc2.HasResponseVariable = true;
model = construct(pkm);
configset = getconfigset(model);
configset.CompileOptions.UnitConversion = true;
%Dose for model
dose = sbiodose('dose', 'TargetName', 'Drug_Central');
dose.StartTime = 0;
dose.Amount = 525;
dose.Rate = 175;
dose.AmountUnits = 'milligram';
dose.TimeUnits = 'hour';
dose.RateUnits = 'milligram/hour';
ResponseMap = {'Drug_Central = CentralConc', 'Drug_Peripheral = PeripheralConc'};
paramsToEstimate = {'log(Central)', 'log(Peripheral)', 'Q12', 'Clearance'};
estimatedParam = estimatedInfo(paramsToEstimate, 'InitialValue', [1 1 1 1])';
pooledFit = sbiofit(model,DrugData,responseMap, estimatedParam,dose, 'Pooled', true);
plot(pooledFit)
%-----------------------------------
%Drug, CentralV, PeripheralV, k12, ClearanceCentral
m = [1.90 4.19 1.2e-5 1.2003e-5; %BEV
1.90 4.19 5.8e-4 5.8014e-4; %DOX
1.90 4.19 1.1e-4 1.1002e-4; %BCNU
1.90 4.19 6.8e-7 6.7961e-7; %PTX
1.90 4.19 7.7e-5 7.7016e-5] %TMZ
>> ModelForDrugDelivery
Attempt to execute SCRIPT DrugData as a function:
/Users/skye/Desktop/MatLab/DrugData.m
Error in ModelForDrugDelivery (line 74)
pooledFit = sbiofit(model,DrugData,responseMap, estimatedParam,dose, 'Pooled', true);
Sheida V
Sheida V on 13 Jul 2022
Edited: Sheida V on 13 Jul 2022
One thing I noticed is that you assigned pkc1.DosingType = 'Infusion' twice. I beleive the second time you meant to define pkc2.DosingType.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!