alternative to diff(X)

20 Ansichten (letzte 30 Tage)
Mate 2u
Mate 2u am 26 Apr. 2012
Hi there, is there anyother 1 line method to diff(X), as diff is not supported in the gpu arrayfun!
Thanks

Akzeptierte Antwort

Honglei Chen
Honglei Chen am 26 Apr. 2012
x = 1:10;
x(2:end)-x(1:end-1)

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by