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

 Respuesta aceptada

Matt J
Matt J el 18 de Dic. de 2018

0 votos

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

Más respuestas (1)

Matt J
Matt J el 18 de Dic. de 2018
Editada: Matt J el 18 de Dic. de 2018

0 votos

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

Categorías

Etiquetas

Preguntada:

el 18 de Dic. de 2018

Comentada:

el 18 de Dic. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by