How to run sbproj using sbiosimulate with a selected dose in SimBiology?

2 次查看(过去 30 天)
Consider the predefiend doses '250 mg bid', '250 mg tid', etc. in the model AntibacterialPKPD.sbproj, see screenshot
dose.png
I am unable to load selected doses, e.g. only '250 mg bid', so far I tried this
clear variables
modelName = 'AntibacterialPKPD.sbproj';
sbioloadproject(modelName,'m1')
[time,x,names] = sbiosimulate(m1,[],[],'250 mg bid')
but get error
>> testAnt
Error using sbiosimulate (line 136)
Expected input number 4, DOBJ, to be one of these types:
SimBiology.Dose
Error in testAnt (line 5)
[time,x,names] = sbiosimulate(m1,[],[],'250 mg bid')
Any comments would be very appreciated!

回答(1 个)

emjey
emjey 2019-10-24
OK, I found it out, I was missing the dose object
modelName = 'AntibacterialPKPD.sbproj';
sbioloadproject(modelName,'m1')
d1 = getdose(m1, '250 mg bid')
[time,x,names] = sbiosimulate(m1,[],[],d1)
plot(time,x(:,1));

社区

更多回答在  SimBiology Community

类别

Help CenterFile Exchange 中查找有关 Extend Modeling Environment 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by