function [] = createBehavHTML(numtrials, numneurons)
imgwidth = 1200;
imgheight = 450;
fid = fopen('behav_index.html', 'w');
fprintf(fid, '\n
\n');
fprintf(fid, 'Neurons\n');
fprintf(fid, [' number of trials:', num2str(numtrials), '
\n']);
fprintf(fid, [' number of neurons:', num2str(numneurons), '
\n']);
cd('behavior');
[names, numnames] = dir2(2e6);
fprintf(fid, '\n');
for channel = 1:19
look = ['behav', num2str(channel), '_'];
if regexp2(names, look)
fileidx = regexp2(names, look);
imgfile = names(fileidx(1), :);
imgfile = regexprep(imgfile, '\s*$', '');
titl = imgfile(regexp(imgfile, '_')+1:end);
titl = regexprep(titl, '\.jpg', '');
fprintf(fid, '\n');
fprintf(fid, ['',titl, ' | \n']);
fprintf(fid, '
\n');
AddImageColumnHTML(fid, 'behavior_thumb', 'behavior', ...
imgfile, imgwidth, imgheight);
end
end
fprintf(fid, '
\n');
fprintf(fid, '\n\n');
fclose(fid);
cd('..');