1
$\begingroup$

I need to calculate the derivative from a list of experimental points. Mathematica has two functions which seem to do this: DifferentiatorFilter and DerivativeFilter. Which one is better for calculating a derivative? Is there one that implements a finite difference method?

From the documentation:

DifferentiatorFilter is commonly used to approximate the derivative of data. Data smoothing with cutoff frequency omega.

and

DerivativeFilter is a linear filter that computes the derivatives of data based on a spline interpolation model. Regularization with a Gaussian kernel of standard deviation [Sigma] (default value is [Sigma]=0) can be used to reduce susceptibility to noise.

thanks!

$\endgroup$
  • 1
    $\begingroup$ I'd try using ListInterpolation and then Derivative. Maybe it's what DerivativeFilter does? $\endgroup$ – K.J. Dec 1 '17 at 11:04
  • 2
    $\begingroup$ I'd use both, and check each with different values of smoothing. Use the one that shows best what you wish to demonstrate. It's like the old proverb: a man with one watch knows what time it is; a man with two watches is never sure. $\endgroup$ – bill s Dec 1 '17 at 15:42
  • $\begingroup$ If the spacing is regular there are also Fourier-based approaches. But I'd try what others have suggested first in any case. $\endgroup$ – Daniel Lichtblau Dec 2 '17 at 16:01
  • $\begingroup$ Thanks for all the suggestions. I've tried with my data, and both functions work ok. DerivativeFilter does multiple order derivatives and DifferentiatorFilter only does first derivatives, but otherwise both work. bill-s: DerivativeFilter seems to be the same as Derivative[ListInterpolation[]]. $\endgroup$ – joao3000 Dec 3 '17 at 17:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.