I have an array of 800,000 data measured at 1.1s time gap. It is oscillating data but has clear linear drift. I want to remove this linear drift. But the estimates by FindFit
and Fit
has been very bad.
Here is my attempt with FindFit
model = e*x + noise[[1]];
fit = FindFit[noise, model, {e}, x]
{e -> -0.0430509}
The value of e
is quite visibly wrong. It should be arround -0.040
. Is there better ways to find and remove linear trends from datas? Thank you very much.
The data can be found here: https://www.dropbox.com/s/xg2w6d4a6bpaejk/data.dat
swd = StationaryWaveletTransform[data, DaubechiesWavelet[2], 8]
and thenListLogLogPlot[ data - .93 Flatten@Reverse@swd[{0, 0, 0, 0, 0, 0, 0, 1}, "Values"]]
$\endgroup$