| Contents | Index |
variantObj =
getvariant(modelObj)
variantObj =
getvariant(modelObj, 'NameValue')
| variantObj | Variant object returned by the getvariant method. |
| modelObj | Model object from which to get the variant. |
| 'NameValue' | Name of the variant to get from the model object modelObj. |
variantObj = getvariant(modelObj) returns SimBiology variant objects contained by the SimBiology model object modelObj to variantObj.
A SimBiology variant object stores alternate values for properties on a SimBiology model. For more information on variants, see Variant object.
variantObj =
getvariant(modelObj, 'NameValue') returns
the SimBiology variant object with the name NameValue,
contained by the SimBiology model object, modelObj.
View properties for a variant object with the get command, and modify properties for a variant object with the set command.
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. |
To copy a variant object to another model, use copyobj. To remove a variant object from a SimBiology model, use the delete method.
Create a model containing several variants.
modelObj = sbiomodel('mymodel');
variantObj1 = addvariant(modelObj, 'v1');
variantObj2 = addvariant(modelObj, 'v2');
Get all variants in the model.
vObjs = getvariant(modelObj)
SimBiology Variant Array Index: Name: Active: 1 v1 false 2 v2 false
Get the variant object named 'v2' from the model.
vObjv2 = getvariant(modelObj, 'v2');

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 |