| Contents | Index |
variantObj =
removevariant(modelObj, 'NameValue')
variantObj =
removevariant(modelObj, variantObj)
| modelObj | Specify the model object from which you want to remove the variant. |
| variantObj | Specify the variant object to return from the model object. |
variantObj = removevariant(modelObj, 'NameValue') removes a SimBiology variant object with the name NameValue from the model object modelObj and returns the variant object to variantObj. The variant object Parent property is assigned [] (empty).
A SimBiology variant object stores alternate values for properties on a SimBiology model. For more information on variants, see Variant object.
variantObj =
removevariant(modelObj, variantObj) removes
a SimBiology variant object (variantObj)
and returns the variant object variantObj.
To view the variants stored on a model object, use the getvariant method. To copy a variant object to another model, use copyobj. To add a variant object to a SimBiology model, use the addvariant method.
Create a model containing several variants.
modelObj = sbiomodel('mymodel');
variantObj1 = addvariant(modelObj, 'v1');
variantObj2 = addvariant(modelObj, 'v2');
variantObj3 = addvariant(modelObj, 'v3');Remove a variant object using its name.
removevariant(modelObj, 'v1');
Remove a variant object using its index number.
Get the index number of the variant in the model.
vObjs = getvariant(modelObj)
SimBiology Variant Array Index: Name: Active: 1 v2 false 2 v3 false
Remove the variant object.
removevariant(modelObj, vObjs(2));

See how to analyze, visualize, and model biological data and systems using MathWorks products.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |