% This is to extract the York usernames of the participants in a
% particular session of an experiment. It takes the data from a file
% users.xls in the temp directory
clear
clc
% cd '\Staff Areas';
% cd 'jdh1\temp';
filename='users.xls';
[num,txt,raw]= xlsread(filename);
nsj=size(txt,1)-1;
emails=txt(2:nsj+1,12);
usernames = erase(emails,'@york.ac.uk')';
filename='allusernames.csv';
output=[];
for sjn=1:1:nsj
    output=[output,usernames(sjn)]
end
writecell(output,filename);
