| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → SimBiology |
| Contents | Index |
| Learn more about SimBiology |
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.
Events cannot result in the capacity having a negative value. Rules could result in the capacity having a negative value.
| Applies to | Object: compartment |
| Data type | double |
| Data values | Positive real number. The default value is 1. |
| Access | Read/write |
Add a compartment to a model and set the compartment capacity.
Create a model object named my_model.
modelObj = sbiomodel ('comp_model');Add the compartment object named nucleus with a capacity of 0.5.
compartmentObj = addcompartment(modelObj, 'nucleus', 0.5);
addcompartment, addspecies, CapacityUnits, ConstantCapacity
![]() | BuiltInUnits | CapacityUnits | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |