Skip to Main Content Skip to Search
Product Documentation

adddose (model) - Add dose object to model

Syntax

doseObj2 = adddose(modelObj, 'DoseName')
doseObj2 = adddose(modelObj, 'DoseName', 'DoseType')
doseObj2 = adddose(modelObj, doseObj)

Arguments

modelObjModel object to which you add a dose object.
DoseNameName of a dose object to construct and add to a model object. DoseName is the value of the dose object property Name.
DoseTypeType of dose object to construct and add to a model object. Enter either 'schedule' or 'repeat'.
doseObjDose object to add to a model object. Created with the constructor sbiodose.

Outputs

doseObj2ScheduleDose or RepeatDose object. A RepeatDose or ScheduleDose object defines an increase (dose) to a species amount during a simulation.

Description

Before using a dose object in a simulation, use the adddose method to add the dose object to a SimBiology model object. Then, set the Active dose object property to true.

doseObj2 = adddose(modelObj, 'DoseName') constructs a SimBiology RepeatDose object (doseObj2), assigns DoseName to the property Name, adds the dose object to a SimBiology model object (modelObj), and assigns modelObj to the property Parent.

doseObj2 = adddose(modelObj, 'DoseName', 'DoseType') constructs either a SimBiology ScheduleDose object or RepeatDose object (doseObj).

doseObj2 = adddose(modelObj, doseObj) adds a SimBiology dose object (doseObj) to a SimBiology model object (modelObj), copies the dose object to a second dose object (doseObj2), and assigns modelObj to the property Parent.

Example

Add a dose object to a model object.

  1. Create a model then add a dose to the model.

    modelObj = sbiomodel('mymodel');
    dose1Obj = adddose(modelObj, 'dose1');
    
  2. Define properties of the dose object.

    dose1Obj.Amount = 5'
    dose1Obj.Repeat = 6;
    dose1obj.Interval = 24;
    dose1Obj.TImeUnits = 'hour'

See Also

Model object methods:

Dose object constructor sbiodose.

ScheduleDose object and RepeatDose object methods:

  


Free Computational Biology Interactive Kit

See how to analyze, visualize, and model biological data and systems using MathWorks products.

Get free kit

Trials Available

Try the latest computational biology products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS