alternative to diff(X)

조회 수: 21 (최근 30일)
Mate 2u
Mate 2u 2012년 4월 26일
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일
x = 1:10;
x(2:end)-x(1:end-1)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 GPU Computing in MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by