title: Matlab - plot image gradients using vector representation
body: <p>I have computed the gradients from every pixel location of a grayscale image, both on X and Y axis and this can result in a vector representation for each pixel location. I want to obtain a plot figure similar to the one illustrated bellow:</p>
  
  <p><img src="https://i.stack.imgur.com/m0Td7.png" alt="enter image description here"></p>
  
  <p>My image has <code>1000 x 1002</code> dimensions and I have computed the gradients for each pixel on <code>X</code> and <code>Y</code> directions so I have 2 matrices, each one having <code>1000 x 1002</code> dimensions. 
  I am interested in obtaining a plot similar to the one illustrated in the image above, where I show basically the direction of each vector obtained from the computed gradients. I do not care about the magnitude of the vector, so basically each arrow can have the same length.</p>
  
  <p>Do you know how can I obtain something similar to this?</p>