%
% CONDVS  Infinity condition of Vandermonde
%   matrix with real symmetric nodes
%
%    x(1)>x(2)> ... >x(n),
%
%       x(i)=x(n+1-i),  i=1,2,...,n
%
%   The input vector is xs=x(1:floor((n+1)/2)). 
%
function c=condVs(n,xs)
ns=floor((n+1)/2);
u=zeros(ns,1);
for i=1:ns
  u(i)=i;
end
np=ns;
if ns==(n+1)/2  % n is odd
  np=ns-1;
end
for i=1:n
  s(i)=sum(xs(1:np).^(i-1));
end
for i=1:ns
  xs0=xs(find(u-u(i)));
  p(i)=prod((1+xs0.^2)./abs(xs(i)^2-xs0.^2));
  e=1/2;
  if ns==(n+1)/2  % n is odd
    if i==ns, e=1; end
    p(i)=e*(1+xs(i))*p(i);
  else
    p(i)=e*(1+1/xs(i))*p(i);
  end
end
c=2*max(max(s),n/2)*max(p);
