Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You could try a <code>ListConvolve</code> with a Gaussian kernel to smooth your data. One of the nice features of this is that the <em>derivative</em> of the <strong>convolution</strong> with a Gaussian kernel is equivalent to <em>convolving</em> with a <strong>derivative</strong> of the Gaussian kernel.</p> <p>Here is some sample data:</p> <pre><code>data = Table[Sin[x] + .5 RandomReal[{-1, 1}], {x, 0, 6 \[Pi], .05}]; ListLinePlot[data] </code></pre> <p><img src="https://i.stack.imgur.com/na1uS.png" alt="enter image description here"></p> <p>This is a simple convolution with a Gaussian kernel:</p> <pre><code>data2 = Block[{\[Sigma] = 2}, ListConvolve[ Table[1/(Sqrt[2 \[Pi]] \[Sigma]) E^(-x^2/(2 \[Sigma])), {x, -2 , 2, 1/10} ], data, {11, 11} ] ]; ListLinePlot[data2] </code></pre> <p><img src="https://i.stack.imgur.com/5t8cG.png" alt="enter image description here"></p> <p>Convolution with the first derivative of a Gaussian:</p> <pre><code>data3 = Block[{\[Sigma] = 1}, ListConvolve[ Table[-((E^(-(x^2/(2 \[Sigma]))) x)/(Sqrt[2 \[Pi]] \[Sigma]^2)), {x, -2 \[Sigma],2 \[Sigma], \[Sigma]/10} ], data, {11, 11} ] ]; ListLinePlot[data3] </code></pre> <p><img src="https://i.stack.imgur.com/sNgpU.png" alt="enter image description here"></p> <p>You may want to play with the sigma parameter to see what gets optimal results in your case.</p> <p>The whole theory behind this is called <a href="http://en.wikipedia.org/wiki/Scale_space" rel="nofollow noreferrer">Scale Space</a>. Note that the above statement about convolution holds for continuous space. <a href="http://en.wikipedia.org/wiki/Scale_space_implementation" rel="nofollow noreferrer">For a discrete implementation, the kernel could be chosen somewhat better.</a></p> <p>Note further that, just as MovingAverage, a convolution can move the features of your data.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload