File Exchange

image thumbnail

Smooth Robust Differentiators

version (69.7 KB) by Jason Nicholson
numerical differentiation with noise suppression


Updated 25 Nov 2014

View Version History

View License

You can use this to differentiate signals/vectors that contain high frequency noise. The more points you use, the larger the noise suppression at the cost of more computation. robustDiff uses both future information and past information to estimate the derivative at the current point (non causal). robustDiffOneSide uses only past information (causal). robustDiffOneSide has a phase shift that increases with increasing number of points used, so be aware.

Installation/Setup Instructions:
Add the contents of the zip to your path. The documentation will be available through "Supplemental Software" link on the MATLAB main document page. The "Supplemental Software" link only shows up if you add the contents of the zip file to your path. If this is to complicated, just look into the "documentation" directory.

The formula's used are from work done by Pavel Holoborodko. More information on these formulas can be found here on his website:

Cite As

Jason Nicholson (2021). Smooth Robust Differentiators (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (3)

Mahdi S. Hosseini

A generalized framework called MaxPol has been recently published and made available here

MaxPol provides a framework to design variety of numerical differentiation kernels with properties like:
(1) Cutoff (lowpass) design with no side-lob artifacts (for noise-robust case)
(2) Arbitrary order of differentiation
(3) Arbitrary polynomial accuracy
(4) Derivative matrix design
(5) 2D Derivative Kernels with Steering moments
(6) Intuitive examples in Signal and Image processing

Jason Nicholson

Help would be appreciated for some one well versed in numerical analysis. Right now the coefficients used in the formula (see documentation) get large quickly. Proper care needs to be taken to minimize the effect of round off error. Best practices or rearranging of the equations would be beneficial. I have even thought of hard coding the coefficients of N<=101 into robustDiff after calculating them with variable precision arithmetic. However, I am not sure what this would be beneficial. I could use advice on what to do here.

MATLAB Release Compatibility
Created with R2013b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!