| SimBiology® | ![]() |
rmreactant(reactionObj, SpeciesName)
rmreactant(reactionObj, speciesObj)
| reactionObj | Reaction object. |
| SpeciesName | Name for a species object. Enter a species name or a cell array of species names. |
| speciesObj | Species object. Enter a species object or an array of species objects. |
rmreactant(reactionObj, SpeciesName), in a reaction object (reactionObj), removes a species object with a specified name (SpeciesName) from the property Reactants, removes the species name from the property Reaction, and updates the property Stoichiometry to exclude the species coefficient.
rmreactant(reactionObj, speciesObj) removes a species object as described above using a MATLAB variable for a species object, or a model index for a species object.
The species object is not removed from the parent model property Species. If the species object is no longer used by any reaction, you can use the method delete to remove it from the parent object.
If one of the species specified does not exist as a reactant, a warning is returned.
This example shows how to remove a reactant that was added to a reaction by mistake. You can remove the species object using the species name.
modelObj = sbiomodel('cell');
reactionObj = addreaction(modelObj, 'Phosphocreatine + ADP + Pi -> creatine + ATP');
rmreactant(reactionObj, 'Pi')
SimBiology Reaction Array
Index: Reaction:
1 Phosphocreatine + ADP -> creatine + ATPRemove a species object using a model index to a species object.
modelObj = sbiomodel('cell');
reactionObj = addreaction(modelObj, 'A -> B + C');
reactionObj.Reaction
ans =
A + B -> C
rmreactant(reactionObj, modelObj.Species(1));
reactionObj.Reaction
ans =
A -> C![]() | rmproduct (reaction) | Root object | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |