Owner
Owning compartment
Description
Owner
shows you the SimBiology® compartment
object that owns the compartment object. In the compartment object,
the Owner
property shows you whether the compartment
resides within another compartment. The Compartments
property
indicates whether other compartments reside within the compartment.
You can add a compartment object using the method addcompartment
.
Characteristics
Applies to | Object: compartment |
Data type | Character vector |
Data values | Name of compartment object. Default is [] . |
Access | Read-only |
Examples
Create a model object named
modelObj
.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');
Display the
Owner
property in the compartment objects.get(compartmentObj3, 'Owner')
The result shows you the owning compartment and its components:
SimBiology Compartment - mitochondrion Compartment Components: Capacity: 1 CapacityUnits: Compartments: 1 ConstantCapacity: true Owner: Species: 0
Change the owning compartment.
set(compartmentObj3, 'Owner', compartmentObj1)