Hi Andres,
I see that you are trying to plot a velocity field defined in polar coordinates using the ‘quiver’ function. The ‘quiver’ function however requires the velocity to be defined in cartesian coordinates. Here’s a documentation link for the ‘quiver’ function:
To plot the velocity field, convert the velocity components from polar coordinates to cartesian coordinates. Here’s a sample code that might help:
clear
clc
x = linspace(-4,4,27);
y = x;
[X, Y] = meshgrid(x,y);
r = sqrt(X.^2 + Y.^2); % r in function of (x, y)
theta = atan2(Y,X); % theta in function of (x, y)
Vr = -10./r;
Vt = 10./r;
u = Vt.*sin(theta) + Vr .* cos(theta);
v = Vt.*cos(theta) - Vr.*sin(theta);
figure
quiver(X, Y, u,v)