This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

get (any object)

Get object properties

Syntax

objProperties = get(Obj)
PropertyValue = get(Obj, PropertyName)
PropertyValues = get(Obj,PropertyArray)

Arguments

PropertyValue

Property value of PropertyName.

Obj

  • Abstract kinetic law, compartment, configuration set, event, kinetic law, model, parameter, PKCompartment, PKData, PKModelDesign PKModelMap, reaction, rule, SimData, species, or variant object.

  • Array of objects.

PropertyName

Name of the property.

objProperties

Structure (or structure array) containing all properties and values of the object(s), Obj.

PropertyArray

Cell array of property names.

PropertyValues

m-by-n cell array, where m is the number of objects in obj and n is the number of property names in PropertyArray.

Description

objProperties = get(Obj) returns all properties and property values of Obj.

PropertyValue = get(Obj, PropertyName) returns the value of specific property, PropertyName. Use quotes around the property name, for example, get(model,'Name'). If Obj is an array of objects, PropertyValue is a m-by-1 cell array of property values, where m is the number of objects in Obj.

PropertyValues = get(Obj,PropertyArray) returns a cell array of property values for the properties in PropertyArray.

Examples

Get Model Dosing Information

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
   SimBiology Dose Array

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

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

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

Retrieve the properties of both Oral and IV doses.

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

Introduced in R2008b