Plot vector field expressed in polar coordinates with quiver in MATLAB -


i want plot following vector field expressed in polar coordinates:

e = r * r  % (i using big r represent r^ hat).  

the field should figure p3.20:

enter image description here

the difficult part converting polar euclidean coordinates:

[x,y] = meshgrid(-5:1:5,-5:1:5);  r = sqrt(x.^2 + y.^2); % r in function of (x, y) theta = atan2(y, x); % theta in function of (x, y)  u = r.*cos(theta); % x component of vector field v = r.*sin(theta); % y component of vector field  quiver(x, y, u, v) 

enter image description here


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -