Using "Fit"

*To*: mathgroup at smc.vnet.net*Subject*: [mg16128] Using "Fit"*From*: "Philip M. Howe" <pmhowe at lanl.gov>*Date*: Sat, 27 Feb 1999 03:23:02 -0500*Sender*: owner-wri-mathgroup at wolfram.com

Hi, I'm trying to analyze some datasets in a moderately efficient way, and am having trouble. Your suggestions will be appreciated. Suppose that I have a dataset, and I want to fit a function through a number of points, where I vary that number systematically, by taking just two {x,y} points, then three points, then four, etc. So, if "data" is my dataset, I can form new datasets by doing Take[data,2], Take[data,3], etc. I can then do a fit to each dataset. Fit[Take[data,2], {1,x},x]; Fit[Take[data,3], {1,x},x]; Fit[Take[data,4], {1,x},x]; etc. But this is slow for large datasets. I can form a table of datasets. Table[Take[data,n],{n,2,100}]; Now I'd like to apply Fit to each of the lists in the table, and I can't figure out the syntax. Or, perhaps there is a better approach. Thanks in advance for your help. Phil