MATLAB: How to 2D plot using the equation of fi and zi

2d plot

fig1.jpg
fig.jpg

Best Answer

The wikipedia page plots only the polar sector 2*pi/(2*n) of the stream lines / potential
The second plot is the full picture.
n = 3/2;
A = 1;
x=linspace(-1,1,21);
y=linspace(-1,1,21);
[X,Y]=ndgrid(x,y);
Z=X+1i*Y;
W = A*Z.^n;
phi = real(W);
psi = imag(W);
close all
subplot(2,1,1);
hold on
plot(phi,psi,'b');
plot(phi.',psi.','g');
axis equal
subplot(2,1,2);
hold on
contour(x,y,phi.',20,'b');
contour(x,y,psi.',20,'g');
axis equal
toto.png
Related Question