Skip to Main Content Skip to Search
Product Documentation

Rules - Array of rules in model object

Description

The Rules property shows the rules in a Model object. Read-only array of SimBiology.Rule objects.

A rule is a mathematical expression that modifies a species amount or a parameter value. A rule defines how certain species and parameters should interact with one another. For example, a rule could state that the total number of species A and species B must be some value.

You can add a rule to a model object with the addrule method and remove the rule with the delete method. For more information on rules, see addrule and RuleType.

Characteristics

Applies toObject: model
Data typeArray of rule objects
Data valuesRule object
AccessRead-only

Examples

  1. Create a model object, and then add a reaction object.

    modelObj = sbiomodel ('my_model');
    reactionObj = addreaction (modelObj, 'a + b -> c + d');
  2. Add a rule.

    ruleobj = addrule(modelObj, '10-a+b')

    MATLAB returns:

    SimBiology Rule Array
    
    Index:    RuleType:    Rule:
     1        algebraic    10-a+b

See Also

addrule, delete

  


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