Content
Contents of variant object
Description
The Content
property contains the data for the variant object. You can
store values for species InitialAmount
, parameter Value
, and compartment Capacity
, in a variant object.
Content
is a cell array of cell arrays, where each cell array
contains information on the component type, component name, property name, and property
value. A valid cell array has the form of
{'Type','Name','PropertyName',PropertyValue}
. If a variant has no
data, the Content
property is set to []
. For a
parameter, if its scope is the model, specify the parameter name. If its scope is a
reaction, qualify the parameter name with the reaction name, such as
"reaction1.k"
, where
k is a reaction-scoped parameter of reaction1. For
details, see addcontent (variant)
.
For more information about variants, see Variant object
.
Characteristics
Applies to | Object: variant |
Data type | cell or double |
Data values | Cell array of cell arrays or [] . The default value is
[] . |
Access | Read/write |
Examples
Create a model containing three species in one compartment.
modelObj = sbiomodel('mymodel'); compObj = addcompartment(modelObj, 'comp1'); A = addspecies(compObj, 'A'); B = addspecies(compObj, 'B'); C = addspecies(compObj, 'C');
Add a variant object that varies the species'
InitialAmount
property.variantObj = addvariant(modelObj, 'v1'); addcontent(variantObj, {{'species','A', 'InitialAmount', 5}, ... {'species', 'B', 'InitialAmount', 10}}); % Display the variant variantObj
SimBiology Variant - v1 (inactive) ContentIndex: Type: Name: Property: Value: 1 species A InitialAmount 5 2 species B InitialAmount 10
Append data to the
Content
property.addcontent(variantObj, {'species', 'C', 'InitialAmount', 15});
SimBiology Variant - v1 (inactive) ContentIndex: Type: Name: Property: Value: 1 species A InitialAmount 5 2 species B InitialAmount 10 3 species C InitialAmount 15
Remove a species from the
Content
property.rmcontent(variantObj, 3);
Replace the data in the
Content
property.set(variantObj, 'Content', {'species', 'C', 'InitialAmount', 15});