addcompartment
Create compartment object and add to model or compartment
Syntax
Description
creates and returns a compartmentObj
= addcompartment(modelCompartmentObj
,compName
)Compartment
object
compartmentObj
. The function also assigns
compName
to theName
property ofcompartmentObj
.modelCompartmentObj
to theParent
property ofcompartmentObj
.compartmentObj
to theCompartments
property of the model object or compartment objectmodelCompartmentObj
.A value of 1 to the
Value
property ofcompartmentObj
.
also assigns the compartmentObj
= addcompartment(modelCompartmentObj
,compName
,capacityValue
)Value
property of compartmentObj
to capacityValue
.
also sets the properties of compartmentObj
= addcompartment(___,Name=Value
)compartmentObj
using one or more name-value
arguments. Name
is the property name and Value
is the
corresponding value. The Owner
property is one exception; you cannot
set the Owner
property because the function requires the owning model
or compartment to be specified as the first argument and uses this information to set the
Owner
property.