function makeDatabase % Prepare the directories and the users for training global voiceDir; global userDir; global worldDir; ucont = dirRetrieval(voiceDir, 0); % read the user names that are in the % database. ulen = size(ucont,1); %%%%%%% WARNING %%%%%%%%%%%%%%%%%%%% % userDir is cleared by makeDatabase %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% if exist(userDir) == 7 rmdir(userDir,'s'); else mkdir(userDir); end for i = 1:ulen % make the directories in the userDir destination if ucont(i).isdir == 1 dir = fullfile(userDir,ucont(i).name); if exist(dir) == 0 mkdir(dir); else warning([dir ': exists']); end dir = fullfile(userDir,ucont(i).name,'voice'); if exist(dir) == 0 mkdir(dir); end dir = fullfile(userDir,ucont(i).name,'signature'); if exist(dir) == 0 mkdir(dir); end dir = fullfile(userDir,ucont(i).name,'face'); if exist(dir) == 0 mkdir(dir); end end end dir = worldDir; if exist(dir) == 0 mkdir(dir); end ra = 0; % 1: split the randomly, 0: every time the same splitting splitFiles(ra); % It splits the files in two categories: train files and % test files. It save the index of the files(as numbers) % in matrices stored in the directories already created in % the previous loop. It doesn't apply for faces.