Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Re: plot gradient vectors over image
Posted:
Aug 15, 2013 9:26 AM


>"amira ali" <amiraali2005@gmail.com> wrote in message >news:kui9c3$7p6$1@newscl01ah.mathworks.com... > please > how can i plot gradient vectors over image using this function > > [Gx,Gy] = gradient2( I ) > % Gx  [hxwxk] xgradient (horizontal) > % Gy  [hxwxk] ygradient (vertical) > > thanks
I assume you mean "gradient" and not "gradient2"
At any rate, it sounds like you want the quiver function: "quiver(x,y,u,v) plots velocity vectors as arrows with components (u,v) at the points (x,y)."
More info here: http://www.mathworks.com/help/matlab/ref/quiver.html



