CapacityUnits
Compartment capacity units
Description
The CapacityUnits
property indicates the
unit definition for the Capacity
property of a
compartment object. CapacityUnits
can be any unit
from the units library. To get a list of the defined units in the
library, use the sbioshowunits
function.
If CapacityUnits
changes from one unit definition
to another, the Capacity
does not automatically
convert to the new units. The sbioconvertunits
function
does this conversion. To add a user-defined unit to the list, see sbioaddtolibrary
.
The CapacityUnits
property is identical to the
Units
property.
Characteristics
Applies to | Object: compartment |
Data type | Character vector |
Data values | Units from library with dimensions of length, area, or volume.
Default = '' (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');
Add a compartment object named
cytoplasm
with a capacity of0.5
.compObj = addcompartment (modelObj, 'cytoplasm', 0.5);
Set the
CapacityUnits
tofemtoliter
, and verify.set (compObj,'CapacityUnits', 'femtoliter'); get (compObj,'CapacityUnits')
MATLAB® returns:
ans = femtoliter