function p = poly2sym(c,x)
%POLY2SYM Polynomial coefficient vector to symbolic polynomial.
%   POLY2SYM(C,V) is a polynomial in the symbolic variable V
%   with coefficients from the vector C.
% 
%   Example:
%       x = sym('x');
%       poly2sym([1 0 -2 -5],x)
%   is
%       x^3-2*x-5
%
%   See also SYM2POLY, POLYVAL.

%   Copyright (c) 1993-98 by The MathWorks, Inc.
%   $Revision: 1.7 $  $Date: 1997/11/29 01:05:58 $

p = sym(0);
for a = c(:).'
   p = p*x + a;
end
p = expand(p);
