Y = diff(X) calculates differences between adjacent elements of X.
Y = diff(X,n) applies diff recursively n times, resulting in the nth difference. Thus, diff(X,2) is the same as diff(diff(X)).
本文介绍如何使用 diff 函数计算数组中相邻元素之间的差值,并解释了递归应用该函数 n 次以得到 n 阶差分的概念。
Y = diff(X) calculates differences between adjacent elements of X.
Y = diff(X,n) applies diff recursively n times, resulting in the nth difference. Thus, diff(X,2) is the same as diff(diff(X)).
20万+
2922

被折叠的 条评论
为什么被折叠?