Unit composition
The Composition
property holds the composition
of a unit object. The Composition
property shows
the combination of base and derived units that defines the unit. For
example, molarity is the name of the unit and the composition is mole/liter.
Base units are the set of units used to define all unit quantity equations.
Derived units are defined using base units or mixtures of base and
derived units.
Valid physical quantities for reaction rates are amount/time, mass/time, or concentration/time.
Applies to | Object: Unit |
Data type | Character vector |
Data values | Valid combination of units and prefixes from the library.
Default is |
Access | Read/write |
This example shows you how to create a user-defined unit, add
it to the user-defined library, and query the Composition
property.
Create a unit for the rate constants of a second-order reaction.
unitObj = sbiounit('secondconstant', '1/molarity*second', 1);
Query the Composition
property.
get(unitObj, 'Composition') ans = 1/molarity*second
Change the Composition
property.
set(unitObj, 'Composition', 'liter/mole*second')) ans = liter/mole*second
Add the unit to the user-defined library.
sbioaddtolibrary(unitObj);
get
, Multiplier
, Offset
, sbiounit
, set