| Contents | Index |
parameterObj = addparameter(Obj,
'NameValue')
parameterObj = addparameter(Obj,
'NameValue', ValueValue)
parameterObj = addparameter(...'PropertyName', PropertyValue...)
| Obj | Model or kinetic law object. Enter a variable name for the object. |
| NameValue | Property for a parameter object. Enter a unique character string. Since objects can use this property to reference a parameter, a parameter object must have a unique name at the level it is created. For example, a kinetic law object cannot contain two parameter objects named kappa. However, the model object that contains the kinetic law object can contain a parameter object named kappa along with the kinetic law object. For information on naming parameters, see Name. |
| ValueValue | Property for a parameter object. Enter a number. |
parameterObj = addparameter(Obj, 'NameValue') creates a parameter object and returns the object (parameterObj). In the parameter object, this method assigns a value (NameValue) to the property Name, assigns a value 1 to the property Value, and assigns the model or kinetic law object to the property Parent. In the model or kinetic law object, (Obj), this method assigns the parameter object to the property Parameters.
A parameter object defines an assignment that a model or a kinetic law can use. The scope of the parameter is defined by the parameter parent. If a parameter is defined with a kinetic law object, then only the kinetic law object and objects within the kinetic law object can use the parameter. If a parameter object is defined with a model object as its parent, then all objects within the model (including all rules, events and kinetic laws) can use the parameter.
modelObj = sbiomodel('cell')
parameterObj = addparameter(modelObj, 'TF1', 0.01)

modelObj = sbiomodel('cell')
reactionObj = addreaction(modelObj, 'a -> b')
kineticlawObj = addkineticlaw (reactionObj, 'MassAction')
parameterObj = addparameter(kineticlawObj, 'K1_forward', 0.1)

parameterObj = addparameter(Obj, 'NameValue', ValueValue) creates a parameter object, assigns a value (NameValue) to the property Name, assigns the value (ValueValue) to the property Value, and assigns the model object or the kinetic law object to the property Parent. In the model or kinetic law object (Obj), this method assigns the parameter object to the property Parameters, and returns the parameter object to a variable (parameterObj).
parameterObj = addparameter(...'PropertyName', PropertyValue...) defines
optional property values. 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).
Scope of a parameter — A parameter can be scoped to either a model or a kinetic law.
When a kinetic law searches for a parameter in its expression, it first looks in the parameter list of the kinetic law. If the parameter isn't found there, it moves to the model that the kinetic law object is in and looks in the model parameter list. If the parameter isn't found there, it moves to the model parent.
When a rule searches for a parameter in its expression, it looks in the parameter list for the model. If the parameter isn't found there, it moves to the model parent. A rule cannot use a parameter that is scoped to a kinetic law. So for a parameter to be used in both a reaction rate equation and a rule, the parameter should be scoped to a model.
Additional parameter object properties can be viewed with the get command. Additional parameter object properties can be modified with the set command. The parameters of Obj can be viewed with get(Obj, 'Parameters').
A SimBiology parameter object can be copied to a SimBiology model or kinetic law object with copyobj. A SimBiology parameter object can be removed from a SimBiology model or kinetic law object with delete.
Methods for parameter objects
| 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 |
| rename (compartment, parameter, species) | Rename object and update expressions |
| set (any object) | Set object properties |
Properties for parameter objects
| ConstantValue | Specify variable or constant parameter value |
| Name | Specify name of object |
| Notes | HTML text describing SimBiology object |
| Parent | Indicate parent object |
| Tag | Specify label for SimBiology object |
| Type | Display SimBiology object type |
| UserData | Specify data to associate with object |
| Value | Assign value to parameter object |
| ValueUnits | Parameter value units |
Create a model object, and then add a reaction object.
modelObj = sbiomodel ('my_model'); reactionObj = addreaction (modelObj, 'a + b -> c + d');
Define a kinetic law for the reaction object.
kineticlawObj = addkineticlaw(reactionObj, 'MassAction');Add a parameter and assign it to the kinetic law object (kineticlawObj); add another parameter and assign to the model object (modelObj).
% Add parameter to kinetic law object parameterObj1 = addparameter (kineticlawObj, 'K1'); get (kineticlawObj, 'Parameters')
MATLAB returns:
SimBiology Parameter Array Index: Name: Value: ValueUnits: 1 K1 1
% Add parameter with value 0.9 to model object parameterObj1 = addparameter (modelObj, 'K2', 0.9); get (modelObj, 'Parameters')
MATLAB returns:
SimBiology Parameter Array Index: Name: Value: ValueUnits: 1 K2 1

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 |