I have a mat file that contains variables named deterministically like a1_1,a1_2,a1_3.... a1_n.. n is variable depending on the mat file I read, but the naming convention remains the same. I need to read all of these in a loop that goes from 1 to n. What is the best way to achieve this?
Ok.. Actually I am running another m file to create those mat files. Is there a different way I can save those variables to the mat files which will help me access these in the way I described earlier. My program does this - I have a varying number of input files which needs to be processed. Each file is processed by an m file to get a set of variables corresponding to that input file which I save in to a mat file. I do the same for all these input files and append the variables to the same mat file. Once I have all these files processed, I work with the mat file to further process the data.