I would like to import multiple files to a 2d array. I know to get a list of files I can do
myfiles=FileNames["*.txt"]
alldata=Import/@myfiles
Is it possible to get my data files in a 2d array if, for example, my files look like
myfiles={file11.txt,file12.txt,file21.txt,file22.txt}
where the numbers in the filenames correspond to an x and y index. I have done this using for loops. Is there a more functional way?
Read the FAQs
! 3) When you see good Q&A, vote them up byclicking the gray triangles
, because the credibility of the system is based on the reputation gained by users sharing their knowledge. ALSO, remember to accept the answer, if any, that solves your problem,by clicking the checkmark sign
`. Another suggestion: a nice user name? $\endgroup$