hi
i have X = [1 5 7 6 9 2 3 1 4 8 6 5]; and i want to do [1+5 5+7 7+6 6+9 ...] how can i do that?
thanks

 채택된 답변

Matt J
Matt J 2018년 12월 18일

0 개 추천

X(1:end-1)+X(2:end)

추가 답변 (1개)

Matt J
Matt J 2018년 12월 18일
편집: Matt J 2018년 12월 18일

0 개 추천

conv(X,[1,1],'valid')

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

태그

질문:

2018년 12월 18일

댓글:

2018년 12월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by