1% Function to write down a LaTex table with the number of function evaluations
2% needed for the testproblems.
3%
4% Joerg Gablonsky, 10/29/00
5% Last changed     04/15/01
6
7title1 = '\\begin{tabular}{lccccccc} \n';
8title2 = 'Problem        & \\multicolumn{3}{c}{DIRECT} &  \\multicolumn{3}{c}{DIRECT-l} \\\\ \n';
9title3 = '               &  f.eval. & Time & $p$  &  f.eval. & Time & $p$  & \\\\ \n';
10title4 = '\\end{tabular}\n';
11form1  = '%28s &   %5i  &  %8.3f  &  %10.2E & %5i  &  %8.3f  &  %10.2E  \\\\ \n';
12
13n = size(result,1);
14
15FID1 = fopen('results.txt','w');
16
17fprintf(FID1,title1);
18fprintf(FID1,title2);
19fprintf(FID1,title3);
20for i=1:n
21  problem = result(i,1);
22  setproblem;
23  fprintf(FID1,form1,problemname,result(i,2:7));
24end
25fprintf(FID1,title4);
26fclose(FID1);
27
28