function [bestv,bestx]=doptdesign(n)
% what design minimizes the variance of the eestimator of the minimum of a quadratic function
% given that the minimum is one of the design points, a four point design and derivative
% information is included???????  Chose 3-d vectors u,v,w, to maximize the determinant v.
% best so far: 
%x=[ [   0  0  0];[-.74 -.37 -.57];[.30 -.80 .52 ];[-.52 .54 .67]];
% has v=2.2727e+6
bestv=0;
bestx=[[0 0 0];eye(3)];
for i=1:n
u=randn(3,3);
d=sqrt(diag(u*u'));
u=.01*round(100*u./repmat(d,1,3));
x=[[0 0 0];u];
d=quaddesign3(x);
v=det(d'*d);
if v>bestv
   bestv=v;
   bestx=x;
end
end

