I am a new matlab user trying to load my 145 .csv-files into matlab. The files have similar names and all contain two columns and 3000 rows. I need to be able to work with column 1 and 2 separately for each file and to plot them (column 2 over 1). So far, I tried the following (for the folder containing all files):
clear ;
direc = dir('*.csv');
for i=1:length(direc)
x = csvread(direc(i).name,1);
end
My x is only of 3000x2 double, but I need the third dimension...and I do not know how to access the 'direc' folder. I also tried to define column 1 and 2 of each file extra by:
time(i,:,:)=x(:,:,1) and
signal(i,:,:)=x(:,:,2)
and to plot it; but it returns a plot only for 1 dataset (1file).
Can someone help me with that? I hope I gave all necessary information.
Thanks!