Skip to Main Content Skip to Search
Product Documentation

sbiorule - Construct rule object

Syntax

ruleObj = sbiorule('RuleValue')
ruleObj = sbiorule(RuleValue, 'RuleTypeValue')

ruleObj = sbiorule(...'PropertyName', PropertyValue...)

Arguments

RuleValueEnter a character string within quotation marks. For example, enter the algebraic rule 'Va*Ea + Vi*Ei - K2'.
RuleTypeValueEnter 'algebraic', 'initialassignment', 'repeatedAssignment', or 'rate'. See RuleType for more information.

Description

A SimBiology rule is a mathematical expression that modifies a species amount, or a parameter value. A rule is a MATLAB expression that uses species, and parameters.

ruleObj = sbiorule('RuleValue') creates a rule object, assigns a value (RuleValue) to the property Rule, assigns the value 'algebraic' to the property RuleType, and assigns the root object to the property Parent.

To use ruleObj in a simulation, ruleObj must be added to a model object with the function copyobj. Note that a rule can also be added to a SimBiology model with the addrule function. A model object is constructed with the function sbiomodel.

ruleObj = sbiorule(RuleValue, 'RuleTypeValue') in addition to the above, this syntax enables you to specify RuleType.


ruleObj = sbiorule(...'PropertyName', PropertyValue...)
defines optional properties. The property name/property value pairs can be in any format supported by the function set (for example, name-value string pairs, structures, and name-value cell array pairs).

View additional rule properties with the function get, and modify rule properties with the function set. View the rules in a model (modelObj) with get(modelObj, 'Rules').

Method Summary

copyobj (any object)Copy SimBiology object and its children
delete (any object)Delete SimBiology object
display (any object)Display summary of SimBiology object
get (any object)Get object properties
set (any object)Set object properties

Property Summary

ActiveIndicate object in use during simulation
AnnotationStore link to URL or file
NameSpecify name of object
NotesHTML text describing SimBiology object
ParentIndicate parent object
RuleSpecify species and parameter interactions
RuleTypeSpecify type of rule for rule object
TagSpecify label for SimBiology object
TypeDisplay SimBiology object type
UserDataSpecify data to associate with object

Examples

Example 1

Construct a rule object and copy it to a model object.

ruleObj = sbiorule('Enzt - Enzi - Enza)');
modelObj = sbiomodel('cell')
ruleObj_copy = copyobj(ruleObj, modelObj);

Example 2

View the help for the rule object's RuleType property.

help(ruleObj, 'RuleType')

Example 3

List the properties for a rule.

get(ruleObj)

        Active: 1
    Annotation: ''
          Name: ''
         Notes: ''
        Parent: []
          Rule: 'myrule'
      RuleType: 'algebraic'
           Tag: ''
          Type: 'rule'
      UserData: []

See Also

addrule | copyobj | sbiomodel

How To

  


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