Azzera filtri
Azzera filtri

Built-in function diff - methodology

3 visualizzazioni (ultimi 30 giorni)
Hi,
What methodology is used in "diff"? Does it take forward or central differences, and what is the step? How can I check the source code?
Thanks in advance!

Risposta accettata

Jonathan Sullivan
Jonathan Sullivan il 3 Apr 2012
help diff
doc diff

Più risposte (2)

Jan
Jan il 3 Apr 2012
You cannot check the code of DIFF, because it is a built-in function. As Jonathan has said already, reading the doc will reveal the internal method. It is the difference of subsequent elements.

Dessislava Koleva
Dessislava Koleva il 3 Apr 2012
Thank you for the fast responses, I guess I'll need something else for my evaluation then. Have a good day!
  2 Commenti
Jan
Jan il 3 Apr 2012
I guess you are looking for GRADIENT.
Dessislava Koleva
Dessislava Koleva il 3 Apr 2012
I'll check it out, yes. I was interested in the order of the error, as I'm getting slightly different numbers from those obtained by a closed form solution. (slightly = 0.002, which is a lot, in my opinion). However, thanks for the answer!

Accedi per commentare.

Categorie

Scopri di più su Programming in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by