From: Roger Stafford on
"Bruno Luong" <b.luong(a)fogale.findmycountry> wrote in message <hsgp6v$d9d$1(a)fred.mathworks.com>...
> Roger, do you have any idea about the robustness of such method when the point abscissa get closer? It's surely not good, but is it more or less robust than the diff command (order=1)? Or more generally what happens when the polynomial order increases?
> Bruno

I don't claim to be an expert in the subject of noise and filters, so I'll just do a little "hand waving".

With data that is comparatively free of noise, the question of low order versus high order polynomial approximations for finding derivatives is dependent on the relative sizes of the higher order versus lower order derivatives inherent in the data. Where higher order derivatives are comparatively small, then high order polynomial approximation is called for, but low order polynomials are better when the data exhibits irregular behavior in its higher derivatives - in others words when it is not so "smooth".

In the absence of noise, close spacing is of course all to the good, the closer the better, especially for the higher order polynomials. The mean value theorem's error term contains not only a high order derivative but is multiplied by a corresponding high power of the spacing interval which one would like to see as small as possible.

However, when noise enters the picture in a serious way, everything changes. Close spacing now becomes undesirable and high order polynomials tend to become worse than low order. But even low order derivative methods suffer from the noise and increasingly require larger spacing as the noise increases. Therefore anyone trying to find derivatives from discrete data needs to take careful account of just how noisy that data is likely to be in choosing the best method.

On the question of evenly-spaced versus unevenly-spaced data, I can see no advantage to unevenly-spaced data as such, as far as accuracy of results is concerned. It is just that certain methods of data collection will naturally tend to produce uneven spacing in the data intervals, so I hold that it is prudent to provide the appropriate tools for handling such data where higher order polynomial approximation is called for. Naturally there will be a larger amount of computation required to handle the more complex expressions involved in uneven spacing. (I'm afraid I didn't go into this last point adequately in this thread; I just let the expressions speak for themselves.)

I hope the above discussion was sufficiently vague to get me by in answering your question, Bruno.

Roger Stafford