[Name_dummy, Names_curves, distances] = ...
    textread('Eight1_LambdaAvgCurvDiff.txt', '%s%s%f');

N = 23;
fid_out = fopen('Eight1_LambdaAvgCurvDiff.tex', 'w');

fprintf(fid_out, '\\begin{tabular}{');
for i = 1:N,
    fprintf(fid_out, '|c');
end
fprintf(fid_out, '|} \n \t\\hline \n');

extention = '.eps';
for i = 1:N,
    file_name = char(Names_curves(i));
    epsfilename = file_name(1:end-4);
    epsfilename = strcat(epsfilename, extention);
    fprintf(fid_out, '\t\\includegraphics[scale=0.05]{\\figdir/%s} &\n', epsfilename);
end
fprintf(fid_out, '\\\\ \\hline \n \t - ');
for i = 2:N,
    fprintf(fid_out, '& %.1f ', distances(i));
end
fprintf(fid_out, '\\\\ \\hline \n\\end{tabular}');

fclose(fid_out);