MATLAB: How to plot vector field

MATLABquivervector fieldvectorizationvectors

Hello Everybody I have 4 vectors x,z,dx,dz which respectively are coordinate of x,coordinate of z, displacement in x direction ,displacement in z direction. I want to plot a vector field graph for displacement, to see the amount and direction of displacement on each point.size of each vector is (110000,1).
What I could think of was
[X,Z]=meshgrid(x(:,1),z(:,1));
D=sqrt(dx.^2+dz.^2);
quiver(X,Z,D,dx)
But didn’t work at all. Any help would be highly appreciated as I am still new to matlab. Thank you in advance
#x,z are evenly spaced, I mean with different intervals.

Best Answer

quiver(x,z,dx,dz)