%
% OPTCONDVL  Optimally conditioned
%   Vandermonde-like matrix with unconstrained
%   nodes
%
f0='%12.5f %11.4e\n';
%f0='%18.6e\n';
ab=r_jacobi(50);
%ab=r_laguerre(50);
%ab=r_hermite(50);
for n=[5 10 20 35 50]
%for n=5:5:25
  x0=zeros(n,1); d=zeros(n,1);
  tic
  xw=gauss(n,ab);
  x0=xw(:,1);
  [xmin,fmin,fl]=fminunc(@(x) condVl(n,x,ab),x0,options)
%  [c,g,gnorm]=condVl(n,xmin,ab)
%  for k=1:n
%    d(k)=abs(xmin(k)+xmin(n+1-k));
%  end
%  dmax=max(d);
%  fprintf(f0,fmin,gnorm)
  t=toc
end
