Filter löschen
Filter löschen

Finding the second derivative of noiseless data curve?

1 Ansicht (letzte 30 Tage)
Esteban
Esteban am 27 Mär. 2012
Hi,
I have a data curve out of which I need to find the derivative of its slope. I understand I can use polyfit to come up with an equation and then take the second derivative. However, this operation generates large errors. As a result I'm looking for a numerical method I can use to come up with a more accurate result. I've tried looking at the Euler and Runge-Kutta methods, however, I don't have an equation to even start out the approximation. Any help is much appreciated!
-E

Antworten (1)

John D'Errico
John D'Errico am 27 Mär. 2012
Computing derivatives, even from a curve that has zero noise in it, is an ill-posed problem, a variation of an ill-posed integral equation. It will be difficult to do this at all accurately.
If you wish to estimate the second derivative everywhere, I'd suggest local curve fits with a MEDIUM order polynomial. The local fit (and then the second derivative computation) can be accomplished using a Savitsky-Golay scheme. You will use filter or conv to do this very efficiently. Make sure that you take care to scale the problem, as otherwise, the polynomial approximation will suffer from numerical problems in the linear algebra.
However, beware. Too high of an order, and it will have numerical problems. Too low of an order, and you will get poor accuracy. Essentially, this is a local truncated Taylor series approximation.

Kategorien

Mehr zu Linear and Nonlinear Regression finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by