2017-09-14 1 views

Antwort

0

Der schwierigste Teil ist die Umwandlung von polaren in euklidische Koordinaten:

[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 the vector field 
v = r.*sin(theta); % y component of the vector field 

quiver(x, y, u, v) 

enter image description here