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 toObject: compartment
Data typechar string
Data valuesName of compartment object. Default is [].
AccessRead-only

Examples

  1. Create a model object named modelObj.

    modelObj = sbiomodel('cell');
  2. Add two compartments to the model object.

    compartmentObj1 = addcompartment(modelObj, 'nucleus');
    compartmentObj2 = addcompartment(modelObj, 'mitochondrion');
  3. Add a compartment to one of the compartment objects.

    compartmentObj3 = addcompartment(compartmentObj2, 'matrix');
    
  4. 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
  5. Change the owning compartment.

    set(compartmentObj3, 'Owner', compartmentObj1)
Was this topic helpful?