Reorder component lists
modelObj = reorder(Obj,NewOrder)
|Model, compartment, or kinetic law object.|
Object vector in the new order. If
As of 2017b, reordering rules has no effect on simulation results because the rules are evaluated as a unified system of constraints. For details, see Evaluation Order of Rules.
the component vector
modelObj = reorder(
modelObj to be in the order
Use this method to reorder any of the component vectors, such as compartments, events, parameters, rules, species, doses, and variants. When reordered, the vector of components must contain the same objects as the original list of objects, though they can be in a different order.
Import a model.
modelObj = sbmlimport('lotka');
Display reactions in the model.
ans = SimBiology Reaction Array Index: Reaction: 1 x + y1 -> 2 y1 + x 2 y1 + y2 -> 2 y2 3 y2 -> z
Reverse the order of reactions in the model.
reorder(modelObj,modelObj.Reactions([3 2 1]));
Display the new order of reactions.
ans = SimBiology Reaction Array Index: Reaction: 1 y2 -> z 2 y1 + y2 -> 2 y2 3 x + y1 -> 2 y1 + x