Main Content

get

Get SimBiology object properties

Description

example

S = get(sobj) returns a structure containing a field for each property of sobj, a SimBiology object.

example

propertyValues = get(sobj,propertyNames) returns the values of the properties specified by propertyNames.

Examples

collapse all

Load the bioavailability model.

sbioloadproject('Bioavailability.sbproj');

Retrieve the name of the model.

modelName = get(m1,'Name')
modelName = 
'Bioavailability Model'

Check the dosing information.

m1.Doses
ans = 
   SimBiology Dose Array

   Index:    Name:        Type:   
   1         Oral dose    schedule
   2         IV Dose      schedule

Retrieve the TimeUnits and AmountUnits properties of the first dose (Oral).

propValues = get(m1.Doses(1),{'TimeUnits','AmountUnits'})
propValues = 1x2 cell
    {'hour'}    {'milligram'}

Retrieve the properties of both the Oral and IV doses.

propValues = get(m1.Doses,{'TimeUnits','AmountUnits'})
propValues = 2x2 cell
    {'hour'}    {'milligram'}
    {'hour'}    {'milligram'}

Input Arguments

collapse all

Object, specified as a SimBiology object or array of SimBiology objects.

Names of the object properties, specified as a character vector, string, string vector, or cell array of character vectors.

Example: {'Name','Type'}

Output Arguments

collapse all

Object property data, returned as a structure or structure array containing a field for each property of the object in sobj.

Property values, returned as a property value or cell array of property values. If propertyNames is a cell array, propertyValues is an m-by-n cell array, where m is the number of objects in sobj and n is the number of names in propertyNames.

See Also

|

Introduced in R2008b