Streamline plot not complete
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Eddward
el 18 de Nov. de 2019
Comentada: Eddward
el 18 de Nov. de 2019
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
0 comentarios
Respuesta aceptada
darova
el 18 de Nov. de 2019
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)
Más respuestas (0)
Ver también
Categorías
Más información sobre Volume Visualization en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!