MATLAB: Arrows of the same length in a quiver plot

arrows of the same length in a quiver plot

Hello,
I know that vectors can be superimposed over a curve using quiver (dx, dy, du, dw, scale). I am only interested in keeping the angle and prefer to have vectors with the same length. I am wondering how I can have vectors with the same length. I have used (dx, dw, du, dw, 1/(du^2+dw^2)) to create the equal length but the length of vectors are still different!
Cheers,
Cyrus

Best Answer

Scale is not the right parameter for your purpose. You need to normalize the velocity:
un=du./sqrt(du.^2+dw.^2);
wn=dv./sqrt(du.^2+dw.^2);
quiver(dx,dy,un,wn)
Best regards,
Michael