How to increase quiver density

4 visualizaciones (últimos 30 días)
Joseph Monarres
Joseph Monarres el 11 de Dic. de 2022
Comentada: Joseph Monarres el 11 de Dic. de 2022
I'm trying to analyse te behaviour of a function around where the lies intersect, but there is not a high enough density of vecotr arrows arouhnd those points and that makes analysing it difficult. How fcan I increase the density of the arrows? I don't so much care about their magnitude, but I need to know their direction.
n = 3;
m = 1;
beta = 3;
gamma = 1;
alpha1 = 1;
alpha2 = 1;
startv = 0;
endv = 4;
A = linspace(0.01,endv);
B1 = (((beta/alpha1)./A)-1).^(1/n);
B2 = (gamma/alpha2)./(1+A.^m);
[X,Y] = meshgrid(startv:endv,startv:endv);
U = beta./(1+(Y).^n) - alpha1.*X;
V = gamma./(1+(X).^m)- alpha2.*Y;
figure
hold on
plot(A,B1,'r')
Warning: Imaginary parts of complex X and/or Y arguments ignored.
plot(A,B2,'b')
axis([0 endv 0 endv]);
title(['n = ',num2str(n),' m = ',num2str(m)])
quiver(X,Y,U,V,1)

Respuestas (1)

Paul
Paul el 11 de Dic. de 2022
Hi Joseph,
Use a finer mesh for setting up X and Y:
n = 3;
m = 1;
beta = 3;
gamma = 1;
alpha1 = 1;
alpha2 = 1;
startv = 0;
endv = 4;
A = linspace(0.01,endv);
B1 = (((beta/alpha1)./A)-1).^(1/n);
B2 = (gamma/alpha2)./(1+A.^m);
[X,Y] = meshgrid(startv:0.2:endv,startv:0.2:endv);
U = beta./(1+(Y).^n) - alpha1.*X;
V = gamma./(1+(X).^m)- alpha2.*Y;
figure
hold on
plot(A,B1,'r')
Warning: Imaginary parts of complex X and/or Y arguments ignored.
plot(A,B2,'b')
axis([0 endv 0 endv]);
title(['n = ',num2str(n),' m = ',num2str(m)])
quiver(X,Y,U,V,1)

Categorías

Más información sobre Vector Fields en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by