| SimBiology® | ![]() |
sbioaddtolibrary (abstkineticlawObj)
sbioaddtolibrary (unitObj)
sbioaddtolibrary (unitprefixObj)
| abstkineticlawObj | Specify the abstract kinetic law object. The Name of the abstract kinetic law must be unique in the user-defined kinetic law library. Name is referenced by kineticlawObj. For more information about creating kineticlawObj, see sbioabstractkineticlaw. |
| unitObj | Specify the user-defined unit to add to the library. For more information about creating unitObj, see sbiounit. |
| unitprefixObj | Specify the user-defined unit prefix to add to the library. For more information about creating unitprefixObj, see sbiounitprefix. |
The function sbioaddtolibrary adds abstract kinetic laws, units, and unit prefixes to the user-defined library.
sbioaddtolibrary (abstkineticlawObj) adds the abstract kinetic law object (abstkineticlawObj) to the user-defined library.
sbioaddtolibrary (unitObj) adds the user-defined unit (unitObj) to the user-defined library.
sbioaddtolibrary (unitprefixObj) adds the user-defined unit prefix (unitprefixObj) to the user-defined library.
The sbioaddtolibrary function adds any abstract kinetic law, unit, or unit prefix to the root object's UserDefinedLibrary property. These library components become available automatically in future MATLAB® sessions.
Use the abstract kinetic law objects in the built-in and user-defined library to construct a kinetic law object with the method addkineticlaw.
To get a component of the built-in and user-defined libraries, use the commands get(sbioroot, 'BuiltInLibrary') and (get(sbioroot, 'UserDefinedLibrary')).
To remove the library component from the user-defined library, use the function sbioremovefromlibrary. You cannot remove an abstract kinetic law object being used by a kinetic law object.
This example shows how to create an abstract kinetic law and add it to the user-defined library.
Create an abstract kinetic law.
abstkineticlawObj = sbioabstractkineticlaw('ex_mylaw1', '(k1*s)/(k2+k1+s)');Assign the parameter and species variables in the expression.
set (abstkineticlawObj, 'SpeciesVariables', {'s'});
set (abstkineticlawObj, 'ParameterVariables', {'k1', 'k2'});Add the new abstract kinetic law to the user-defined library.
sbioaddtolibrary(abstkineticlawObj);
The function adds the abstract kinetic law to the user-defined library. You can verify this using sbiowhos.
sbiowhos -kineticlaw -userdefined SimBiology Abstract Kinetic Law Array Index: Library: Name: Expression: 1 UserDefined mylaw1 (k1*s)/(k2+k1+s)
Use the new abstract kinetic law when defining a reaction's kinetic law.
modelObj = sbiomodel('cell');
reactionObj = addreaction(modelObj, 'A + B <-> B + C');
kineticlawObj = addkineticlaw(reactionObj, 'ex_mylaw1');addkineticlaw, sbioabstractkineticlaw, sbioremovefromlibrary, sbioroot, sbiounit, sbiounitprefix
![]() | sbioabstractkineticlaw | sbioconsmoiety | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |