Effacer les filtres
Effacer les filtres

alternative to diff(X)

6 vues (au cours des 30 derniers jours)
Mate 2u
Mate 2u le 26 Avr 2012
Hi there, is there anyother 1 line method to diff(X), as diff is not supported in the gpu arrayfun!
Thanks

Réponse acceptée

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

Plus de réponses (0)

Catégories

En savoir plus sur GPU Computing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by