where the summation is over all species j coupled to species i and A ij = k ji is the sole off-diagonal element whenever i is coupled to j (A ij = 0 otherwise). Construction of A in MATLAB can be performed by preconstructing a matrix {k ij } of rate constants. When k ij is encountered in a traversal make the assignments