alternative to diff(X)

6 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)

Kategorien

Mehr zu GPU Computing finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by