% Matlab module to read in the scores for a series of files and % compute their means % Set up a vector corresponding to the files to be read in PCA1s26 = [ 6:6:78 ]; % Read all the results % Initialise the table of averages and file counter to zero meanCleanPCA1s26 = zeros([length(PCA1s26) 7]); count = 0; % Loop through each file in the list for i=PCA1s26 % Compose the complete path and filename pca1sFile = cat(2, resDir, '/pca/results_1s26_', int2str(i),'/clean.acc'); % Read in the contents of the file cleanPCA1s26 = load(pca1sFile); % Increment the file counter count = count + 1; % Calculate the average meanCleanPCA1s26(count,:) = mean(cleanPCA1s26); end