Move SimBiology compartment object to new owner
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';
c1 = move(c1,c2);
The owner of
c1 is now
ans = SimBiology Compartment - c2 Compartment Components: Value: 1 Units: Compartments: 1 Constant: true Owner: Species: 1
compObj— SimBiology compartment
SimBiology compartment, specified as a compartment object.
newOwner— New owner object
New owner object, specified as a model object or compartment object.