function he=halfeq(st,fr)
% halfeq	- Used in setstc to set up stoic
% function he=halfeq(st,fr)
% Argument List:
% Argument     Gives
%    st     a numeric vector of coefficients
%    fr     a character array of formulae
% halfeq is primarily used by chemeq.
% Ex: halfeq([1 3],['NH3';'H2O'])
% OKB
he = '';
lst=length(st);
for i=1:lst
   if st(i)~=0
      if st(i)~=1
         he=[he,num2str(st(i))];
      end
      he=[he,fr(i,:),' '];
      if i~=lst
         he=[he,'+ '];
      end
   end
end

