Main Content

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 toObject: compartment
Data typeCharacter vector
Data valuesUnits from library with dimensions of length, area, or volume. Default = '' (empty).
AccessRead/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.

Examples

  1. Create a model object named my_model.

    modelObj = sbiomodel ('my_model');
    
  2. Add a compartment object named cytoplasm with a capacity of 0.5.

    compObj = addcompartment (modelObj, 'cytoplasm', 0.5);
    
  3. Set the CapacityUnits to femtoliter, and verify.

    set (compObj,'CapacityUnits', 'femtoliter');
    get (compObj,'CapacityUnits')
    

    MATLAB® returns:

    ans =
    
    femtoliter