Hi,
I've a set of files obtained from an instrument with filenames in the format "insXpY.mat", X and Y being integers. For example, "ins8p1.mat", "ins8p7.mat",... "ins8p41.mat" and so on...
I can import any such file using
d8p41=Import["ins8p41.mat"]
and then I can process the data array 'd8p41' in whatever way I like. This however gets quite exhausting when I have multiple folders with several such files in each folder. What I would like to do (for every folder) is have a loop in which, say the j^th file (with j being uniquely related to X & Y; see below for that) is imported with the variable name set as dXpY. The unique mapping between j and X & Y can be simply made because
fn = FileNames["*mat"]
returns me a list of the files with extension 'mat'. However, I have not been able to figure out how to set the variable name on the left hand side during the file importing, using the same kind of mapping. Any inputs in this regard would be very welcome!