Diagonal direction - difference between adjacent elements
Show older comments
I have a matrix,
I = 5 4 3
9 8 6
6 3 4
How can I calculate differences between adjacent elements in a diagonal directions. I want these outputs(for first and last rows and columns I don't mind padding):
5 4 3
5 5 6
2 -3 4
and
5 4 3
9 3 2
6 -6 -4
Accepted Answer
More Answers (0)
Categories
Find more on Operating on Diagonal Matrices in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!