Extract linear data from non-linear curve


alanr
02-18-2004, 10:12 AM
Hi,
i have a non-linear curve (150 data points)with a section of linear data points (25-35 data points) in the middle of the total curve.
I need an efficient method of obtaining this linear section.

at the moment im tryin to write code,which fits linears and computes the regression of the fit.

it fits to 15 data points at a time (starting at the beginning of the curve (non-linear part) and working towards the linear section) and checks the regression.

If R>0.99 it will stop and begin to read out the following say 25 data points (assuming that there are 25 on the linear section)

if .98<R<.99 it will again fit to 15 data points overlapping 13 of the previous points and chek R

if .97<R<.98 it will overlap by 10,(FIT and check R)..(**)

and so on until

if R<.95 it will fit to the next 15 points with no overlapping
until such time that we get R>.99

has anyone got a better method
I WOULD BE MOST GREATFUL
CHEERS
ALAN.







i