Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: problems with memory usage

  • To: mathgroup at
  • Subject: [mg63314] Re: problems with memory usage
  • From: Bill Rowe <readnewsciv at>
  • Date: Fri, 23 Dec 2005 05:08:37 -0500 (EST)
  • Sender: owner-wri-mathgroup at

On 12/20/05 at 11:35 PM, marcellesantos at (Marcelle Santos)

>I have to fit a model to a long set of data from previous
>calculations. These data are in a file called "ptab.m", which has
>this structure:


The primary tool for fitting models to data is FindFit which handles both linear and non-linear models. FindFit wants to see the data list in the form of an nXm matrix. So, I assume what you need to do is transform the data structure into something FindFit accepts, i.e.,

data = {{k1,{{x1, y1}, {x2, y2}, {x3, y3}}}, 
       {k2, {{x1, y1}, {x2, y2}, {x3, y3}}}}; 

Join @@ Transpose /@ 
   (Join[{Table[First[#1], {Length[Last[#1]]}]}, 
         Transpose[Last[#1]]]&)/@ data
{{k1, x1, y1}, {k1, x2, y2}, 
  {k1, x3, y3}, {k2, x1, y1}, 
  {k2, x2, y2}, {k2, x3, y3}}
To reply via email subtract one hundred and four

  • Prev by Date: Re: problems with memory usage
  • Next by Date: Extracting information from lists
  • Previous by thread: Re: Re: problems with memory usage
  • Next by thread: Convincing Mathematica that Sqrt[a+b]Sqrt[a-b]==Sqrt[a^2+b^2]