Main Content

getdose

Return exported SimBiology model dose object

Description

example

doses = getdose(model) returns all the SimBiology.export.Dose objects associated with the exported model.

example

doses = getdose(model,doseName) returns the export dose object with the Name property matching doseName.

Examples

collapse all

Open a sample SimBiology model project, and export the included model object.

sbioloadproject('AntibacterialPKPD')
em = export(m1);

Display the editable doses in the exported model object.

doses = getdose(em)
doses = 

  1x4 RepeatDose array with properties:

    Interval
    RepeatCount
    StartTime
    TimeUnits
    Amount
    AmountUnits
    DurationParameterName
    LagParameterName
    Name
    Notes
    Parent
    Rate
    RateUnits
    TargetName

The exported model has 4 repeated dose objects. Display the dose names.

{doses.Name}

ans = 

    '250 mg bid'    '250 mg tid'    '500 mg bid'    '500 mg tid'

Extract only the 3rd dose object from the exported model object.

dose3 = getdose(em,'500 mg bid')

dose3 = 

  RepeatDose with properties:

                 Interval: 12
              RepeatCount: 27
                StartTime: 0
                TimeUnits: 'hour'
                   Amount: 500
              AmountUnits: 'milligram'
    DurationParameterName: 'TDose'
         LagParameterName: ''
                     Name: '500 mg bid'
                    Notes: ''
                   Parent: 'Antibacterial'
                     Rate: 0
                RateUnits: ''
               TargetName: 'Central.Drug'

Input Arguments

collapse all

Input model, specified as a SimBiology.export.Model object.

Dose name, specified as a character vector or string scalar. The doseName input must contain a name to match against the Name property of the export dose objects in model. If you do not specify doseName, then getdose returns all dose objects.

Output Arguments

collapse all

Output doses, returned as export dose objects in model, or the export dose object with Name property doseName.

Version History

Introduced in R2012b