Tag Info

3

In version 10.2 there is a new experimental function which might be what you are looking for: FindFormula. I suspect that a genetic programming algorithm (symbolic regression) is behind this new feature. See also my question here: What is behind Mathematica's experimental FindFormula function?

0

One way is to smear the samples, that is, convolve with something fairly well localized. I show this using a Gaussian. The code is nothing special, and with some work one might be able to use Fourier transform methods in a similar way, with perhaps better results. Anyway, here goes. We start with data as given in the original post. {otimes, ovals} = ...

3

It's a little blocky in the "lump" (-1 to +4 on the x-axis), but you might also like Show[ ListPlot[data, Joined -> True, PlotRange -> All, PlotStyle -> Black], ListLinePlot[Transpose[{ data[[All, 1]], InverseWaveletTransform[ WaveletThreshold[ DiscreteWaveletTransform[data[[All, 2]]]]] ...

3

This may not be exactly what you want but maybit it will help you pose the question better ( I get the feeling you are jumping in to writing code without knowing what result you actually expect ) d = Import["D:/1092.txt", "Table"][[;; -2, {1, 3}]]; smooth = MovingAverage[d, 20]; ListPlot[smooth] d1 = Select[smooth, 1092.855 < #[[1]] < 1092.88 ...

4

The default type is an unsigned integer. You need to specify a suitable type, eg: testList = {1, 2, 3, -4}; file = "test1"; BinaryWrite[file, testList, "Integer8"]; BinaryReadList[file, "Integer8"] Close[file]; Note the read needs to know the type as well. See BinaryRead for the list of types. (Integer8 is only good for values in the range -128 to 127 of ...

0

Gaussian Processes are a very useful approach for such things. I wrote about them here (where it wasn't what the OP wanted), but it's basically a text book example for your situation: Curve Fitting to Represent Any Data It's computationally more expensive than a rolling average, but mathematically far superior. Basically a function-free fit. You can also ...

7

Mathematica has a lot of utilities for smoothing. If your data is evenly sampled, a simple MovingAverage filter may suit your needs, but your abscissa values jump around a bit: Part[Differences@data, All, 1] // ListPlot In this case, you can get a more accurate smoothed curve with MovingMap, which can deal with irregularly spaced data: GraphicsGrid[{{ ...

7

You may want to explore the use of LowpassFilter for smoothing. fd = Transpose@{data[[All, 1]], LowpassFilter[data[[All, 2]], 0.5]};

3

So it's hard to say from your data what is signal and what is noise. But one way to get what you are looking at is to plot a moving average. Here you plot the average of three points, data3pointaverage = Table[{data[[n, 1]], Mean[data[[n - 1 ;; n + 1, 2]]]}, {n, 2,Length@data - 1}]; ListLinePlot[{data, data3pointaverage}, PlotStyle -> {Automatic, ...

2

I believe I have found something that may solve your problem. I discovered today: DataUnorderedAssociation This is an undocumented function that appears to work like Association at least in a limited set of operations, yet it puts its keys into a consistent order: DataUnorderedAssociation /@ Permutations@{"d" -> 1, "b" -> 2, "a" -> 3, "c" ...

Top 50 recent answers are included