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

2 visualizaciones (últimos 30 días)
emjey
emjey el 24 de Oct. de 2019
Respondida: emjey el 24 de Oct. de 2019
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!

Respuestas (1)

emjey
emjey el 24 de Oct. de 2019
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));

Comunidades de usuarios

Más respuestas en  SimBiology Community

Categorías

Más información sobre Extend Modeling Environment en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by