MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: open multiple files

  • To: mathgroup at smc.vnet.net
  • Subject: [mg93228] RE: [mg93186] open multiple files
  • From: "David Annetts" <davidannetts at aapt.net.au>
  • Date: Fri, 31 Oct 2008 03:09:29 -0500 (EST)
  • References: <200810300703.CAA00680@smc.vnet.net>

Hi Jeff,
> 
> 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?

It's possible but difficult to be specific given the code you've posted ....

For me, the easiest way is to read data from multiple files into a single
array, then run through the array performing your regressions on each data
set -- something like ....

	SetDirecory@NotebookDirectory[];
	ifiles = FileNames["*.txt"]
	idata = Import[#]& /@ ifiles;

	rset = FindFit[#, model, {}, {}]& /@ idata;

should do the trick.

Regards,

Dave.




  • Prev by Date: ColorData as a Funnction of height values
  • Next by Date: RE: Re: Re: Is there a way to make Mathematica commands and functions
  • Previous by thread: open multiple files
  • Next by thread: Re: open multiple files