MathGroup Archive 2003

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

Search the Archive

Re: Fit with lists instead of functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg40291] Re: Fit with lists instead of functions
  • From: Bill Rowe <listuser at earthlink.net>
  • Date: Sun, 30 Mar 2003 04:08:13 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

On 3/29/03 at 5:20 AM, martin_rommel at yahoo.com (Martin) wrote:

>It ought to be simple, I just don't know where to find it: I want to
>do a (linear, least square) fit but instead of functions in a variable
>I want to use lists of the same length as the data list.

Is this what you have in mind

In[1]:=
listA=Table[Random[],{10}];
listB=Table[Random[],{10}];
Fit[Transpose[{listA,listB}],{1,x},x]

Out[3]=
0.7560816265287248 - 0.26693573953881305*x


  • Prev by Date: Plotting intersections
  • Next by Date: Re: Need a nice way to do this
  • Previous by thread: Re: Fit with lists instead of functions
  • Next by thread: Chemometrics/nn package for Mathematica