⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fileoutput.m

📁 优化问题中的直接搜索法
💻 M
字号:
% Function to write down a LaTex table with the number of function evaluations% needed for the testproblems.%% Joerg Gablonsky, 10/29/00% Last changed     04/15/01title1 = '\\begin{tabular}{lccccccc} \n';title2 = 'Problem        & \\multicolumn{3}{c}{DIRECT} &  \\multicolumn{3}{c}{DIRECT-l} \\\\ \n';title3 = '               &  f.eval. & Time & $p$  &  f.eval. & Time & $p$  & \\\\ \n';title4 = '\\end{tabular}\n';form1  = '%28s &   %5i  &  %8.3f  &  %10.2E & %5i  &  %8.3f  &  %10.2E  \\\\ \n';n = size(result,1);FID1 = fopen('results.txt','w');  fprintf(FID1,title1);fprintf(FID1,title2);fprintf(FID1,title3);for i=1:n  problem = result(i,1);  setproblem;  fprintf(FID1,form1,problemname,result(i,2:7));endfprintf(FID1,title4);fclose(FID1);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -