Percentile plot in SimBiology model analyzer

1 回表示 (過去 30 日間)
Jesse Chao
Jesse Chao 2022 年 9 月 22 日
コメント済み: Jesse Chao 2022 年 9 月 29 日
Hello team,
How could I access to the percentile plot (shown as below with purple box) in simbiology model analyzer through code?
Is it a undocumented function?
Thank you very much.
Best,
Jesse

回答 (1 件)

Jeremy Huard
Jeremy Huard 2022 年 9 月 22 日
Hi Jess,
this built-in plot is currently not available on the command line.
But I have attached my own implementation. Hopefully, you will find it useful.
Here is an example:
pkmd = PKModelDesign;
pkmd.addCompartment('Central', DosingType='Bolus', EliminationType='linear',...
HasResponseVariable=true, HasLag=false);
pkmd.addCompartment('Peripheral', DosingType='Bolus', EliminationType='',...
HasResponseVariable=true, HasLag=false);
model = pkmd.construct;
ka = sbioselect(model, 'Type','Parameter','Name','ka_Central');
ka.Value = 0.1;
cs = getconfigset(model);
cs.CompileOptions.UnitConversion = true;
dObj_Oral = adddose(model,'DailyDoseOral');
dObj_Oral.Amount = 0.1;
dObj_Oral.RepeatCount = 3;
dObj_Oral.TargetName = 'Dose_Central';
dObj_Oral.AmountUnits = 'milligram';
dObj_Oral.TimeUnits = 'hour';
dObj_Oral.Interval = 24;
dObj_Oral.StartTime = 0;
pd1 = makedist('Lognormal', mu=0.2, sigma=0.2);
pd2 = makedist('Normal', mu=2, sigma=0.5);
samples = SimBiology.Scenarios(["Q12", "ke_Central"], [pd1 pd2], Number=100, SamplingMethod='random');
observableNames = {'Drug_Central','Drug_Peripheral'};
timeEnd = 47; % hours
f = createSimFunction(model, samples, observableNames, dObj_Oral.TargetName);
data = f(samples, timeEnd, getTable(dObj_Oral));
figure;
sbioplotscan(data);
grid on;
Best regards,
Jérémy
  1 件のコメント
Jesse Chao
Jesse Chao 2022 年 9 月 29 日
Hello Jérémy,
Thank you for the excellent example.
In fact, I am interested in the percentile plot for plotting the observed data (orange).
Is there any way to create the percentile pot, which has a similar appearance to the percentile plot embedded in the Simbiology model analyzer?
Because my data has unequal n in different time points, I found that the percentile plot embedded in the Simbiology model analyzer gave me the best result I expected.
Could you please further show me some information or guidance?
Thank you very much.
Best,
Jesse

サインインしてコメントする。

コミュニティ

その他の回答  SimBiology コミュニティ

カテゴリ

Help Center および File ExchangeScan Parameter Ranges についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by