alternative to diff(X)

4 次查看(过去 30 天)
Mate 2u
Mate 2u 2012-4-26
Hi there, is there anyother 1 line method to diff(X), as diff is not supported in the gpu arrayfun!
Thanks

采纳的回答

Honglei Chen
Honglei Chen 2012-4-26
x = 1:10;
x(2:end)-x(1:end-1)

更多回答(0 个)

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by