Help Center
Move SimBiology compartment object to new owner
Since R2020b
compObj = move(compObj,newOwner)
compObj = move(compObj,newOwner) moves a SimBiology® compartment object compObj to a new owner newOwner.
compObj
newOwner
example
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.
Introduced in R2020b
copyobj | move | SimBiology.Compartment | SimBiology.Species | SimBiology.Parameter | SimBiology.Model | SimBiology.Reaction | SimBiology.KineticLaw | Observable
copyobj
move
SimBiology.Compartment
SimBiology.Species
SimBiology.Parameter
SimBiology.Model
SimBiology.Reaction
SimBiology.KineticLaw
Observable
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
Europe
Asia Pacific
Contact your local office