I have a matrix containing a set of points:
[ 100,100,40,50,30, 30,100,20,20,30, 10,20,45,30,22, 102,200,10,0,10 10,20,20,30,40 ]
Is there a way we can retrieve a directional gradient (vector) from this matrix? The vector should be pointing toward the region that contains higher values. As for this example, as you can see, the values that are greater than 100 are mostly toward the left, therefore we can estimate that the vector maybe pointing leftward from right.
I am looking for a formula that is flexible enough such that, even if we change the size of the matrix, we would be able to compute a directional gradient.
My apologies if I am not using the right term for directional gradient, as my math knowledge only goes as far as calculus 2.
EDIT 1: Each row represent an increasing value of y. At the first row, y=1, and at the last row, y=5. Each column represents an increasing value of x. At first column x=1, and last column x=5.