addcompartment (model, compartment)
Create compartment object
Syntax
compartmentObj
=
addcompartment(modelObj
, 'NameValue
')
compartmentObj
=
addcompartment(owningCompObj
, 'NameValue
')
compartmentObj
=
addcompartment(modelObj
, 'NameValue
', CapacityValue
)
compartmentObj
=
addcompartment(...'PropertyName
', PropertyValue
...)
Arguments
| Model object |
| Compartment object that contains the newly created compartment object. |
| Name for a compartment object. Enter a character vector unique
to the model object. For information on naming compartments,
see |
| Capacity value for the compartment object. Enter double .
Positive real number, default = 1 . |
| Enter the name of a valid property. Valid property names are listed in Property Summary. |
| Enter the value for the property specified in .
Valid property values are listed on each property reference page. |
Description
creates
a compartment object and returns the compartment object (compartmentObj
=
addcompartment(modelObj
, 'NameValue
')
).
In the compartment object, this method assigns a value (compartmentObj
)
to the property NameValue
Name
, and assigns the model object
(modelObj
)
to the property Parent
. In the model object, this
method assigns the compartment object to the property Compartments
.
in addition to the above, adds the newly created compartment within
a compartment object (compartmentObj
=
addcompartment(owningCompObj
, 'NameValue
')
),
and assigns this compartment object (owningCompObj
)
to the owningCompObj
Owner
property of the newly created compartment
object (
).
The parent model is the model that contains the owning compartment
(compartmentObj
).owningCompObj
,
in addition to the above, this method assigns capacity compartmentObj
=
addcompartment(modelObj
, 'NameValue
', CapacityValue
)
for
the compartment.(CapacityValue)
If you define a reaction within a model object (modelObj
)
that does not contain any compartments, the process of adding a reaction
generates a default compartment object and assigns the reaction species
to the compartment. If there is more than one compartment, you must
specify which compartment the species should be assigned to using
the format CompartmentName
.SpeciesName
.
defines
optional properties. Property Summary lists
the properties. The compartmentObj
=
addcompartment(...'PropertyName
', PropertyValue
...)Owner
property is one exception;
you cannot set the Owner
property in the addcompartment
syntax
because, addcompartment
requires the owning model
or compartment to be specified as the first argument and uses this
information to set the Owner
property.
Method Summary
Methods for compartment objects
addcompartment (model, compartment) | Create compartment object |
addspecies (model, compartment) | Create species object and add to compartment object within model object |
copyobj | Copy SimBiology object and its children |
delete | Delete SimBiology object |
display | Display summary of SimBiology object |
findUsages | Find out how a species, parameter, or compartment is used in a model |
get | Get SimBiology object properties |
move | Move SimBiology compartment object to new owner |
rename | Rename object and update expressions |
reorder (model, compartment, kinetic law) | Reorder component lists |
set | Set SimBiology object properties |
Property Summary
Properties for compartment objects
Capacity | Compartment capacity |
CapacityUnits | Compartment capacity units |
Compartments | Array of compartments in model or compartment |
Constant | Specify variable or constant species amount, parameter value, or compartment capacity |
ConstantCapacity | Specify variable or constant compartment capacity |
Name | Specify name of object |
Notes | HTML text describing SimBiology object |
Owner | Owning compartment |
Parent | Indicate parent object |
Species | Array of species in compartment object |
Tag | Specify label for SimBiology object |
Type | Display SimBiology object type |
Units | Units for species amount, parameter value, compartment capacity, observable expression |
UserData | Specify data to associate with object |
Value | Value of species, compartment, or parameter object |
Examples
Version History
Introduced in R2007bSee Also
model object
| addproduct
| addreactant
| addreaction
| addspecies