Parameter value units
The ValueUnits
property indicates the unit definition of the
Value
property of a parameter object.
ValueUnits
can be one of the built-in units. To get a list of the
built-in units, use the sbioshowunits
function. If ValueUnits
changes from one unit definition to another, the
Value
does not automatically convert to the new units. The sbioconvertunits
function does this conversion.
The ValueUnits
property is identical to the Units
property.
Applies to | Object: species, compartment, parameter |
Data type | Character vector |
Data values | Unit from units library. Default is '' (empty
character vector). Note that the default value of an empty character
vector means unspecified. Unspecified units are permitted during dimensional
analysis, but not during unit conversion. (Use 'dimensionless' to
specify dimensionless units.) |
Access | Read/write |
Note
SimBiology® uses units including empty units in association
with DimensionalAnalysis
and UnitConversion
features.
When DimensionalAnalysis
and UnitConversion
are
both false
, 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
is true
and UnitConversion
is false
,
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 to true
(which
requires DimensionalAnalysis
to be true
),
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 to dimensionless
.
Assign a parameter with a value to the model object.
Create a model object, and then add a reaction object.
modelObj = sbiomodel('my_model');
Add a parameter with Value
0.5
,
and assign it to the model object (modelObj
).
parameterObj1 = addparameter(modelObj, 'K1', 0.5, 'ValueUnits', '1/second')
MATLAB® returns:
SimBiology Parameter Array Index: Name: Value: ValueUnits: 1 K1 0.5 1/second