Hey,
I have several mat files located in a folder called "matFile". the script is located in the uperfolder of this matFile folder. I mean Folder1 incluses the script and matFile folder. Using following lines I try to access to the mat files. Each mat file is a 1-by-190 cell array
matpath = 'C\...\matFile';
matfiles = dir(fullfile(matpath ,'*'));
N1 = setdiff({matfiles.name},{'.','..'});
then N1 give me all the data in matFile folder, i.e.,
{'time1.mat'} {'time2.mat'} {'time3.mat'} {'time4.mat'}
{'location1.mat'} {'location2.mat'} {'location3.mat'} {'location4.mat'}
{'space1.mat'} {'space2.mat'} {'space3.mat'} {'space4.mat'}
However, when I call load(N1{1}) I got the error that this file is not in the directory. Any idea? Is there a way that I can load data in a for loop?
Thanks in advance!