I am trying to do an analysis on 6 different sets of data with the names log_1 - log_6. I put the analysis in a for loop but can't get MATLAB to load the next file for each iteration. Basically, this is what I want to do:
*rest of analysis*
*calculation* = newvariable(n)
to create an array called newvariable with the outcome for each set of data in it. But MATLAB gives the following error:
Error using ==> load
Unable to read file log_n.mat: No such file or directory.
which makes sense because log_n doesn't exist.
How do I load the different files in the for loop so the analysis will be done on the right data?