필터 지우기
필터 지우기

How to simulate multiple doses and generate only one plot?

조회 수: 3 (최근 30일)
Lo
Lo 2023년 9월 13일
댓글: Sam Chak 2023년 9월 16일
I want to try many dosages of one species and generate only one plot. So I wonder if simbiology has such a function or if I need to use another Matlab tool.
the plot is like this:

답변 (3개)

Bhargavi Srija Ramisetty
Bhargavi Srija Ramisetty 2023년 9월 13일
Hi Lo,
I believe you can use repeat dosing feature in simbiology.
Best
Srija

Sam Chak
Sam Chak 2023년 9월 13일
Hi @Lo
Are you looking to plot something like this?
m1 = sbiomodel('onecomp');
r1 = addreaction(m1,'drug -> null');
k1 = addkineticlaw(r1,'MassAction');
p1 = addparameter(k1,'ke','Value',1.0,'ValueUnits','1/hour');
k1.ParameterVariableNames = 'ke';
r2 = addreaction(m1,'dose -> drug');
k2 = addkineticlaw(r2,'MassAction');
p2 = addparameter(k2,'ka','Value',0.1,'ValueUnits','1/hour');
k2.ParameterVariableNames = 'ka';
amt = [250 500]; % dosage amount
for j = 1:numel(amt)
d1 = sbiodose('d1','repeat');
d1.Amount = amt(j);
d1.AmountUnits = 'milligram';
d1.Interval = 8;
d1.TimeUnits = 'hour';
d1.RepeatCount = 5;
d1.Active = true;
d1.TargetName = 'dose';
cs = getconfigset(m1);
cs.StopTime = 48;
cs.TimeUnits = 'hour';
cs.RuntimeOptions.StatesToLog = {'drug'}; % comment out this line if want to plot dosage
[t, sd, species] = sbiosimulate(m1,d1);
plot(t, sd), hold on
end
hold off, grid on
legend('250 mg', '500 mg', 'Location', 'NW');
xlabel('Hours');
ylabel('Drug Concentration');
  댓글 수: 2
Lo
Lo 2023년 9월 13일
hi Sam Chak
I'm not very familiar with program. could you please show me in diagram form ? thank you !
best
Eric
Sam Chak
Sam Chak 2023년 9월 16일
Hi @Lo,
I believe you might be referring to the SimBiology Model Analyzer app, which offers a user-friendly graphical interface for entering data and performing actions with just a few clicks. You can find useful information and examples on this page:

댓글을 달려면 로그인하십시오.


Jeremy Huard
Jeremy Huard 2023년 9월 13일
Hi @Lo,
you can also scan over single dosing parameters such as its amount or even scan over a list of dose objects.
There is an example in the documentation of a scan over a dosing amount that will help you:
Best,
Jérémy

커뮤니티

더 많은 답변 보기:  SimBiology Community

카테고리

Help CenterFile Exchange에서 Import Data에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by