subtract numbers in the row

I have a row of different numbers like x=[12; 15; 19; 29; 37; 58...] how can I better subtract one number from the other like 15-12, 19-15, 29-19....?

 Réponse acceptée

Iain
Iain le 24 Juin 2013

1 vote

diff(x)

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by