Create a difference loop from a cumulative matrix
Mostrar comentarios más antiguos
Hello
I have this data filed that I imported into a 831x1 matrix. The numbers in it are cumulative so I need to create a for loop that shows the difference between the row and the one before it so that I can have the pure added quantity in each row. If possible, I would like the first row to stay the same as it was in the imported file.
How do I do this?
4 comentarios
madhan ravi
el 8 de Abr. de 2019
diff(matrix) % ?
Mohamed Amine Mouajib
el 8 de Abr. de 2019
madhan ravi
el 8 de Abr. de 2019
Why are you sticking with a loop , is it your homework?
Mohamed Amine Mouajib
el 8 de Abr. de 2019
Respuesta aceptada
Más respuestas (1)
Mohamed Amine Mouajib
el 8 de Abr. de 2019
0 votos
Categorías
Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!