Hello, I have an image of a river (Grids) which I plot using 'imagesc'. This works fine. I want to draw an arrow from say point A to point B. I have the x and y coordinates for both point A and B. So the sizes of all vectors match each other. Still I get the following error: Error using quiver (line 44) The size of X must match the size of U or the number of columns of U. How is can I fix this? Thanks in advance!
if true % code figure; imagesc(Grids); colormap('gray'); hold on x = [397 406]; y = [111 137]; uv = y-x; quiver(x,y,uv(1),uv(2)); end