commit
Commit variant contents to model
Syntax
commit(variantObj, modelObj)
Arguments
| Specify the model object to which you want to commit a variant. |
| Variant object to commit to the model object. |
Description
commit(
commits the variantObj, modelObj)Contents property of a SimBiology® variant object ()
to the model object variantObj. The property
values stored in the variant object replace the values stored in the model.modelObj
A SimBiology variant object stores alternate values for properties on a SimBiology model. For more information on variants, see Variant object.
The Contents are set on the model object in order of occurrence,
with duplicate entries overwriting. If the commit method finds an
incorrectly specified entry, an error occurs and the remaining properties defined in the
Contents property are not set.
Examples
Create a model containing one species.
modelObj = sbiomodel('mymodel'); compObj = addcompartment(modelObj, 'comp1'); speciesObj = addspecies(compObj, 'A', 10);Add a variant object that varies the
InitialAmountproperty of a species named A.variantObj = addvariant(modelObj, 'v1'); addcontent(variantObj, {'species', 'A', 'InitialAmount', 5});Commit the contents of the variant (
).variantObjcommit (variantObj, modelObj);
See Also
Version History
Introduced in R2007b