Hello, so I'm trying to get a list of the names of every file .mat on a folder (all of the files on this folder) and save this result in a variable so I can use it later on a for loop. I've tried this:
cd 'C:\Users\David\Documents\Tesis\matlab\resultados\saves' % folder that I want the files from
folder= dir ('*.mat')bea= zeros(16,1) % 16 is the number of elements in the folder
contador=0for i=1:16contador= contador+1name=folder(i).namebea(contador,:)= nameend
I don't even know if this is possible this way, I'm just trying a lot of things. I will definitely appreciate it if somebody can help me
Best Answer