alternative to diff(X)

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일

1 개 추천

x = 1:10;
x(2:end)-x(1:end-1)

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 GPU Computing in MATLAB에 대해 자세히 알아보기

질문:

2012년 4월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by