Imagine I have a data set which gives me the following ListLinePlot
Is it possible to define a function over the data set that removes the "spikes" observed in the data and smoothens the plot, for a given threshold?
Imagine I have a data set which gives me the following ListLinePlot
Is it possible to define a function over the data set that removes the "spikes" observed in the data and smoothens the plot, for a given threshold?
data =
Table[Evaluate @ Re @ FourierSeries[t^5, t, 4], {t, -3. Pi, 3. Pi, 6. Pi/128}];
Using GaussianFilter
ListLinePlot[Table[GaussianFilter[data, n], {n, {0, 6, 12, 24}}],
PlotLegends -> {"data", 6, 12, 24},
PlotRange -> All]
data =
Table[Evaluate@Re@FourierSeries[t^5, t, 4], {t, -3. π, 3. π, 6. π/128}];
Grabbing the @eldo's data and using LowpassFilter:
smoothedData = LowpassFilter[data, 0.3];
ListLinePlot[{data, smoothedData},
PlotLegends -> {"Original Data", "Smoothed Data"}, PlotRange -> All]
GaussianFilterdocs pages underApplications. – Syed Nov 07 '22 at 17:08