Main Content

sbiovariant

Construct variant object

Description

variantObj = sbiovariant(vName) creates a variant object named vName.

example

variantObj = sbiovariant(vName,vContent) creates a variant object and sets its Content property to the cell array of data, vContent.

example

variantObj = sbiovariant(___,Name,Value) uses any of the input arguments in the previous syntaxes and additional options specified by one or more Name,Value pair arguments. Each name-value pair represents a property and corresponding value of a variant object. To view all the properties for a variant object, use the get function.

To append more data to an existing content of a variant, use addcontent. To replace existing data in the Content property, use the set function or dot notation.

example

Examples

collapse all

Load the G protein model.

sbioloadproject gprotein

The model already has a variant for a mutant strain.

getvariant(m1)
ans = 
   SimBiology Variant - mutant (inactive)

   ContentIndex:     Type:        Name:             Property:           Value:
   1                 parameter    kGd               Value               .004

Create another variant with the kGd value of 0.5, and initial amount of 5000 for the G species.

v2 = sbiovariant('v2');
v2.Content = {{'parameter','kGd','Value',0.5},...
              {'species','G','InitialAmount',5000}}
v2 = 
   SimBiology Variant - v2 (inactive)

   ContentIndex:     Type:        Name:             Property:           Value:
   1                 parameter    kGd               Value               .5
   2                 species      G                 InitialAmount       5000.0

Simulate the model using the initial conditions specified in v2.

sbioplot(sbiosimulate(m1,v2));

Figure contains an axes object. The axes object with title States versus Time, xlabel Time, ylabel States contains 7 objects of type line. These objects represent G, Gd, Ga, RL, R, Gbg, GaFrac.

Simulate the wild-type (original) model to compare.

sbioplot(sbiosimulate(m1));

Figure contains an axes object. The axes object with title States versus Time, xlabel Time, ylabel States contains 7 objects of type line. These objects represent G, Gd, Ga, RL, R, Gbg, GaFrac.

Input Arguments

collapse all

Name of a variant object, specified as a character vector.

Example: 'cancerPatient'

Variant content, specified as a cell array or cell array of cell arrays. Each cell array must have four values in this order: the type of model element, its name, its property name, and the alternate value of the property. For instance, {'species','A','InitialAmount',5} specifies to store an alternate initial amount of 5 for the species A.

Example: {'parameter','ka','Value',0.3}

Output Arguments

collapse all

Variant with alternate model values, specified as a Variant object.

Version History

Introduced in R2008a