Array of compartments in model or compartment
Compartments shows you a read-only array
of SimBiology® compartment objects in the model object and the
compartment object. In the model object, the
indicates all the compartments in a
as a flat list. In the compartment object, the
indicates other compartments that are referenced within the compartment.
The two instances of
Compartments are illustrated
You can add a compartment object using the method
|Applies to||Objects: compartment, model|
|Data type||Array of compartment objects|
|Data values||Compartment object. Default is |
Create a model object named
modelObj = sbiomodel('cell');
Add two compartments to the model object.
compartmentObj1 = addcompartment(modelObj, 'nucleus'); compartmentObj2 = addcompartment(modelObj, 'mitochondrion');
Add a compartment to one of the compartment objects.
compartmentObj3 = addcompartment(compartmentObj2, 'matrix');
in the model object.
SimBiology Compartment Array Index: Name: Capacity: CapacityUnits: 1 nucleus 1 2 mitochondrion 1 3 matrix 1
in the compartment object.
SimBiology Compartment - matrix Compartment Components: Capacity: 1 CapacityUnits: Compartments: 0 ConstantCapacity: true Owner: mitochondrion Species: 0