If interested I found a solution to this problem, the code is as follows:
% code
'C:\DATA\Jess\CSV files\29-8-17 csv';%
if ~ isdir(files)%
errormessage = sprintf('Error: The following file does not exist:\n&s',files);
uiwait(warndlg(errormessage));
return;
end
filepattern = fullfile(file,'*.csv');
thefiles = dir(filepattern);
for j = 1: length(thefiles);
filename = thefiles(j).name;
fullfilename = fullfile(files, filename);
fprintf(1, 'Now reading %s\n', fullfilename);
if j == 1
dataArray = csvread(fullfilename);
x = dataArray(:,1)
y = dataArray(:,2)
else
y = [y , csvread(fullfilename,0,1)];
end
end
plot(x,y)