I had some code computing the second difference of a sampled signal as
(x(n-1)-2x(n)+x(n+1))/(square of interval)
I only needed a crude estimate of the second derivative in this case.
Then I came across "five point stencils"
By this method, the second difference is
(-x(n-2)+16x(n-1)-30n(n)+16x(n+1)-x(n+2))/12/(square of interval)
And then 5-sample Savitsky-Golay formula, which seems rather different
(2x(n-2)-x(n-1)+2x(n)-x(n+1)+2x(n+2))/7/(square of interval)
Are either of these "better" in any sense?
Reply by Greg Berchin●April 25, 20192019-04-25
On Thursday, April 25, 2019 at 3:13:58 AM UTC-5, conr...@gmail.com wrote:
> I only needed a crude estimate of the second derivative in this case.