% sdpsol source log_chebychev -- find x such that
% |log(Ax) - log(b)|_\infty is minimized.
%
% sdp problem
%   minimize    t
%   subject to  [t-a_i^T*x/b_i   0   0
%                0   a_i^T*x/b_i     1
%                0   1               t] >= 0, i=1,...,p
%
% WARNING: cannot be run from UNIX, since A, b are not defined.
k = cols(A);
p = rows(A);
variable x(k,1),t;

A*x .< t*b;
for i=1:p;
  [A(i,:)*x, 1;
   1,        t/b(i,1)] > 0;
end;

minimize err_bnd = t;
