# numerical gradient of an array

I have 2D arrays of numeric data and I would like to calculate the vector gradient of these arrays.

I would like to achieve something like the 'gradient' function of MatLab: https://www.mathworks.com/help/matlab/ref/gradient.html

In my understanding the 'Grad' function of Mathematica works on expressions of functions. I had a look at other functions but I didn't seem to find anything appropriate. I tried searching on the stackexchange, I apologize if this is trivial or a duplicate, I would really appreciate it if someone could point me in the right direction.

Thank you very much.

• I think you need Differences. – Αλέξανδρος Ζεγγ Jan 29 '18 at 13:47
• The two-sided approximation matlab uses (except for the endpoints) is ListCorrelate[{-1, 0, 1}/2, data]. – Coolwater Jan 29 '18 at 14:01
• Have you looked at GradientFilter or GradientOrientationFilter? You can find commands where you know part of the name by using wlldcard searches, in this case, ?*Gradient* – bill s Jan 29 '18 at 14:15