Create a difference loop from a cumulative matrix
이전 댓글 표시
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
madhan ravi
2019년 4월 8일
diff(matrix) % ?
Mohamed Amine Mouajib
2019년 4월 8일
madhan ravi
2019년 4월 8일
Why are you sticking with a loop , is it your homework?
Mohamed Amine Mouajib
2019년 4월 8일
채택된 답변
추가 답변 (1개)
카테고리
도움말 센터 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!