How can I find the difference between adjacent elements while ignoring the first value?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Benjamin Horsley
el 15 de Feb. de 2021
Comentada: Benjamin Horsley
el 15 de Feb. de 2021
I have the following column vector.
data = randperm(100,15)';
Is there a way of using the "diff" function to find the difference between adjacent elements while ignoring the first one? In other words, I would like the calculation to start with elements 2 and 3 then 4 and 5 etc.
Appreciate the help! Thanks.
0 comentarios
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Get Started with MATLAB en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!