Re: Re:Nonlinear fit to inverse power law data plot
- To: mathgroup at smc.vnet.net
- Subject: [mg14149] Re: [mg14115] Re:Nonlinear fit to inverse power law data plot
- From: "Jens-Peer Kuska" <kuska at linmpi.mpg.de>
- Date: Mon, 28 Sep 1998 18:57:15 -0400
- Sender: owner-wri-mathgroup at wolfram.com
Hi Debbie, You can fit y=c*x^(-n) simply with a linear fit (Fit[]) if You use {Log[x],Log[y]} instead of the original data pairs {x,y} Your model say that Log[y]==Log[c]-n*Log[x] say Your data are named dataset dataset=Table[{x,0.2*x^(-1.5)},{x,0.5,10,0.1}]; fitPara=Fit[dataset /. {x_?NumericQ,y_}:>{Log[x],Log[y]},{1,lnx},lnx] /. a_. +b_.*lnx :> {E^a,b} will return a list of c and -n. Hope that helps Jens -----Original Message----- From: jleddon <jleddon at cyberramp.net> To: mathgroup at smc.vnet.net Subject: [mg14149] [mg14115] Re:Nonlinear fit to inverse power law data plot > >Hello, >I have a set of data that when plotted, produces a curve that is >definitely of a inverse-power-law form; > > y=constant*x^-n where n may be a non-integer. > >I have tried the nonlinear fit function with model function forms, >however, I have not been able to get a non-integer value for n. > >Does anyone have any ideas? > >Thanks in advance for your help! > >Regards, >Debbie Leddon > > >