This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Specify variable or constant compartment capacity


The ConstantCapacity property indicates whether the capacity of the compartment object can vary during the simulation. ConstantCapacity can be either true (1) or false (0). If ConstantCapacity is true, the quantity of the compartment cannot vary during the simulation. By default, ConstantCapacity is true and the quantity of the compartment cannot vary during the simulation. If ConstantCapacity is false, the quantity of the compartment can be determined by rules and events.


Applies toObject: compartment
Data typeboolean
Data valuestrue or false. The default value is true.


Add a compartment to a model and check the ConstantCapacity property of the compartment.

  1. Create a model object named comp_model.

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

    compartmentObj = addcompartment(modelObj, 'nucleus', 0.5);
  3. Display the ConstantCapacity property.

    get(compartmentObj, 'ConstantCapacity')
    ans =
Was this topic helpful?