This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Species initial amount units


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 meter2, then species must be amount/meter2 or amount.


Applies toObject: species
Data typeCharacter vector
Data valuesUnits from library with dimensions of amount, amount/length, amount/area, or amount/volume. Default is '' (empty).


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.


  1. Create a model object named my_model.

    modelObj = sbiomodel ('my_model');
    compObj = addcompartment(modelObj, 'cell');
  2. Add a species object named glucose.

    speciesObj = addspecies (compObj, 'glucose');
  3. Set the initial amount to 100, InitialAmountUnits to molecule, and verify.

    set (speciesObj,'InitialAmountUnits','molecule'); 
    get (speciesObj,'InitialAmountUnits')

    MATLAB® returns:

    ans =