Move SimBiology compartment object to new owner
compObj = move(compObj,newOwner)
example
compObj = move(compObj,newOwner) moves a SimBiology® compartment object compObj to a new owner newOwner.
compObj
newOwner
collapse all
Create a model with two compartments.
m = sbiomodel('cell'); c1 = addcompartment(m,'c1'); c2 = addcompartment(m,'c2'); p = addparameter(m,'k1',5); r = addreaction(m,'c1.A + c1.B -> c2.B'); k = addkineticlaw(r,'MassAction'); k.ParameterVariableNames = 'k1';
Move compartment c1 to c2.
c1
c2
c1 = move(c1,c2);
The owner of c1 is now c2.
c1.Owner
ans = SimBiology Compartment - c2 Compartment Components: Value: 1 Units: Compartments: 1 Constant: true Owner: Species: 1
SimBiology compartment, specified as a compartment object.
New owner object, specified as a model object or compartment object.
Compartment | copyobj | KineticLaw | Model | move | Observable | Parameter | Reaction | Species
Compartment
copyobj
KineticLaw
Model
move
Observable
Parameter
Reaction
Species
You have a modified version of this example. Do you want to open this example with your edits?