addcontent (variant)
Append content to variant object
Syntax
addcontent(variantObj, contents)
addcontent(variantObj1, variantObj2)
Arguments
| Specify the variant object to which you want to append data.
The Content property is modified to add the new
data. |
| Specify the data you want to add to a variant object.
Contents can either be a cell array or an array of cell arrays. A
valid cell array should have the form |
| 'Type' | 'Name' | 'PropertyName' |
|---|---|---|
'species' | Name of the species. If there are multiple species in the model
with the same name, specify the species as [compartmentName.speciesName],
where compartmentName is the name of the compartment
containing the species. | 'InitialAmount' |
'parameter' | If the parameter scope is a model, specify the parameter name.
If the parameter scope is a kinetic law, specify [reactionName.parameterName]. | 'Value' |
'compartment' | Name of the compartment. | 'Capacity' |
Description
addcontent( adds
the data stored in the variable variantObj, contents)contents to
the variant object (variantObj).
addcontent( appends
the data in the variantObj1, variantObj2)Content property
of the variant object variantObj2 to the Content property
of variant object variantObj1.
Note
Remember to use the addcontent method instead
of using the set method on the Content property
because the set method replaces the data in the Content property,
whereas addcontent appends the data.
Examples
Create a model containing one species.
modelObj = sbiomodel('mymodel'); compObj = addcompartment(modelObj, 'comp1'); speciesObj = addspecies(compObj, 'A');Add a variant object that varies the
InitialAmountproperty of a species named A.variantObj = addvariant(modelObj, 'v1'); addcontent(variantObj, {'species', 'A', 'InitialAmount', 5});
See Also
Version History
Introduced in R2007b