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.

Capacity

Compartment capacity

Description

The Capacity property indicates the size of the SimBiology® compartment object. If the size of the compartment does not vary during simulation, set the property ConstantCapacity to true.

You can vary compartment capacity using rules or events.

Note

Remember to set the ConstantCapacity property to false for varying capacity.

Events cannot result in the capacity having a negative value. Rules could result in the capacity having a negative value.

Characteristics

Applies toObject: compartment
Data typedouble
Data valuesPositive real number. The default value is 1.
AccessRead/write

Examples

Add a compartment to a model and set the compartment capacity.

  1. Create a model object named my_model.

    modelObj = sbiomodel ('comp_model');
  2. Add the compartment object named nucleus with a capacity of 0.5.

    compartmentObj = addcompartment(modelObj, 'nucleus', 0.5);