Built-in function diff - methodology

3 次查看(过去 30 天)
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!

采纳的回答

Jonathan Sullivan
help diff
doc diff

更多回答(2 个)

Jan
Jan 2012-4-3
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
Thank you for the fast responses, I guess I'll need something else for my evaluation then. Have a good day!
  2 个评论
Jan
Jan 2012-4-3
I guess you are looking for GRADIENT.
Dessislava Koleva
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!

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by