| Contents | Index |
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.
| Applies to | Object: variant |
| Data type | cell array |
| Data values | Default value is [] (empty). |
| Access | Read/write |
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');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
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
Remove a species from the Content property.
rmcontent(variantObj, 3);
Replace the data in the Content property.
set(variantObj, 'Content', {'species', 'C', 'InitialAmount', 15});addcontent, rmcontent, sbiovariant

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 |