function eqn=chemeq(st,cn)
% chemeq	- Used in setstc to help set up stoic for chemical equations
% function eqn=chemeq(st,cn)
% Argument List:
% Argument   Gives
%   st      a vector of stoichiometric coefficients.
%   cn      a list of chemical names or formula.
% eqn is a character vector giving the equation.
% OKB
str = [];
cnr = '';
stp = [];
cnp = '';
scn=size(cn);
lst=length(st);
for i=1:lst
   if st(i)<0
      str=[str,(-st(i))];
      cnr=[cnr;cn(i,:)];
   elseif st(i)>0
      stp=[stp,st(i)];
      cnp=[cnp;cn(i,:)];
   end
end
eqn=halfeq(str,cnr);
eqn=[eqn,' --> '];
eqn=[eqn,halfeq(stp,cnp)];
