Azzera filtri
Azzera filtri

alternative to diff(X)

6 visualizzazioni (ultimi 30 giorni)
Mate 2u
Mate 2u il 26 Apr 2012
Hi there, is there anyother 1 line method to diff(X), as diff is not supported in the gpu arrayfun!
Thanks

Risposta accettata

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

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by