InitialAmountUnits
Species initial amount units
Description
The InitialAmountUnits
property indicates
the unit definition for the InitialAmount
property
of a species object. InitialAmountUnits
can be
one of the built-in units. To get a list of the defined units, use
the sbioshowunits
function.
If InitialAmountUnits
changes from one unit definition
to another, InitialAmount
does not automatically
convert to the new units. The sbioconvertunits
function
does this conversion. To add a user-defined unit to the list, use sbiounit
followed by sbioaddtolibrary
.
See DefaultSpeciesDimension
for
more information on specifying dimensions for species quantities. InitialAmountUnits
must
have corresponding dimensions to CapacityUnits
.
For example, if the CapacityUnits
are meter
2,
then species must be amount/meter
2 or amount
.
The InitialAmountUnits
property is identical to the
Units
property.
Characteristics
Applies to | Object: species |
Data type | Character vector |
Data values | Units from library with dimensions of amount, amount/length,
amount/area, or amount/volume. Default is '' (empty). |
Access | Read/write |
Note
SimBiology® uses units including empty units in association
with DimensionalAnalysis
and UnitConversion
features.
When
DimensionalAnalysis
andUnitConversion
are bothfalse
, units are not used. However, SimBiology still performs a minimum level of dimensional analysis to decide whether a reaction rate is in dimensions of amount/time or concentration/time.When
DimensionalAnalysis
istrue
andUnitConversion
isfalse
, units (if not empty) must have consistent dimensions so that SimBiology can perform dimensional analysis. However, the units are not converted.When
UnitConversion
is set totrue
(which requiresDimensionalAnalysis
to betrue
), SimBiology performs a dimensional analysis and converts everything to consistent units. Hence, you must specify consistent units, and no units can be empty. If you have a dimensionless parameter, you must still set its unit todimensionless
.
Examples
Create a model object named
my_model
.modelObj = sbiomodel ('my_model'); compObj = addcompartment(modelObj, 'cell');
Add a species object named
glucose
.speciesObj = addspecies (compObj, 'glucose');
Set the initial amount to
100
,InitialAmountUnits
tomolecule
, and verify.set (speciesObj,'InitialAmountUnits','molecule'); get (speciesObj,'InitialAmountUnits')
MATLAB® returns:
ans = molecule