get
Get SimBiology object properties
Description
returns the values of the properties specified by propertyValues
= get(sobj
,propertyNames
)propertyNames
.
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
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
sobj
— Object
SimBiology object | array of SimBiology objects
Object, specified as a SimBiology object or array of SimBiology objects.
propertyNames
— Names of object properties
character vector | string | string vector | cell array of character vectors
Names of the object properties, specified as a character vector, string, string vector, or cell array of character vectors.
Example: {'Name','Type'}
Output Arguments
S
— Object property data
structure | structure array
Object property data, returned as a structure or structure array containing a field
for each property of the object in sobj
.
propertyValues
— Property values
property value | cell array
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
.
Version History
Introduced in R2008b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)