MATLAB: Streamline plot not complete

MATLAB and Simulink Student Suitenot completeplotquiverstreamline

I have been trying to make this streamline plot, unfortunately I have not been able to make it complete. I have looked on different forum pages but was not able to find a solution.
My code:
clear, clc
Gamma=-4;
a=1;
b=1;
Q=1;
[x,y]=meshgrid(-1:0.05:4,-1:0.05:1);
u= (y./(2*pi.*(x.^2+y.^2)))...
+(((2*Q.*b)/((a^2)*pi.*Gamma))...
.*((2*y.*(x-1))./((x.^2+y.^2-2.*x+1).^2)));
v= -((x)./(2.*pi.*(x.^2+y.^2)))...
-(((2*Q*b)./((a^2)*pi.*Gamma))...
*(((x.^2-y.^2-2.*x+1)./((x.^2+y.^2-2.*x+1).^2))));
hold on , clf
figure(1)
quiver(x,y,u,v)
N = 15;
startx = max(x).*rand(N,1);
starty = max(y).*rand(N,1);
streamline(x,y,u,v,startx,starty)
startx2 = -max(x).*rand(N,1);
starty2 = -max(y).*rand(N,1);
streamline(x,y,u,v,startx2,starty2)
startx3 = rand(N,1);
starty3 = rand(N,1);
streamline(x,y,u,v,startx3,starty3)
hold off
2019-11-18 12_51_18-Figure 1.png

Best Answer

Works ok for me
N = 15;
xx = linspace(min(x(:)),max(x(:)),10);
yy = linspace(min(y(:)),max(y(:)),10);
[startx,starty] = meshgrid(xx,yy);
streamline(x,y,u,v,startx,starty)
Related Question