MathGroup Archive 2008

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

Search the Archive

Re: Fit data with range


Hi,

fit = Fit[Select[data,(xmin<=First[#1]<=xmax) &],{1,x,x^2},x]

??

Regards
   Jens

Ivan wrote:
> Hi
> 
> I want to fit a polynomial function to a set of data,
> only between say xmin to xmax. How can I do that?
> I know only how to fit the whole range.
> 
> For example:
> 
> data = ReadList["file.dat",{Number,Number}];
> 
> fit = Fit[data,{1,x,x^2},x]
> 
> Plot[fit,{x,0,10}]
> 
> 
> 
> thanks!
> 


  • Prev by Date: root of complex function
  • Next by Date: Re: Identical elements
  • Previous by thread: RE: Fit data with range
  • Next by thread: Re: Fit data with range