Re: open multiple files
- To: mathgroup at smc.vnet.net
- Subject: [mg93218] Re: open multiple files
- From: Bill Rowe <readnews at sbcglobal.net>
- Date: Fri, 31 Oct 2008 03:07:40 -0500 (EST)
On 10/30/08 at 2:03 AM, ziv28 at hotmail.com (JeffC) wrote: >do you know any way to import multiple files in the mathematica, I >would like to do nonlinear regression for each of these files at one >notebook Is it possible? There are a variety of ways to do this. Suppose the current working directory contains just those files you want to process. And further suppose each of those files is a simple table of numbers with each row being a separate data point and each column being separated by either spaces or tabs. Then FindFit[ReadList[#, Number, RecordLists->True], model, parameters, variables]&/@FileNames[] will do what you want. If any of my assumptions are incorrect, simply replace ReadList with say Import and/or filter the list of file names returned by FileNames.