Skip to Main Content Skip to Search
Product Documentation

Content - Contents of variant object

Description

The Content property contains the data for the variant object. Content is a cell array with the structure {'Type', 'Name', 'PropertyName', 'PropertyValue'}. You can store values for species InitialAmount, parameter Value, and compartment Capacity, in a variant object.

For more information about variants, see Variant object.

Characteristics

Applies toObject: variant
Data typecell array
Data valuesDefault value is [] (empty).
AccessRead/write

Examples

  1. Create a model containing three species in one compartment.

    modelObj = sbiomodel('mymodel');
    compObj = addcompartment(modelObj, 'comp1');
    A = addspecies(compObj, 'A');
    B = addspecies(compObj, 'B');
    C = addspecies(compObj, 'C');
  2. Add a variant object that varies the species' InitialAmount property.

    variantObj = addvariant(modelObj, 'v1');
    addcontent(variantObj, {{'species','A', 'InitialAmount', 5}, ...
    {'species', 'B', 'InitialAmount', 10}});
    % Display the variant
    variantObj
    
    SimBiology Variant - v1 (inactive)
    
       ContentIndex:     Type:        Name:             Property:           Value:
       1                 species      A                 InitialAmount       5
       2                 species      B                 InitialAmount       10
    
  3. Append data to the Content property.

    addcontent(variantObj, {'species', 'C', 'InitialAmount', 15});
    SimBiology Variant - v1 (inactive)
    
       ContentIndex:     Type:        Name:             Property:           Value:
       1                 species      A                 InitialAmount        5
       2                 species      B                 InitialAmount       10
       3                 species      C                 InitialAmount       15
  4. Remove a species from the Content property.

    rmcontent(variantObj, 3);
  5. Replace the data in the Content property.

    set(variantObj, 'Content', {'species', 'C', 'InitialAmount', 15});

See Also

addcontent, rmcontent, sbiovariant

  


Free Computational Biology Interactive Kit

See how to analyze, visualize, and model biological data and systems using MathWorks products.

Get free kit

Trials Available

Try the latest computational biology products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS