How to increase quiver density
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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')
plot(A,B2,'b')
axis([0 endv 0 endv]);
title(['n = ',num2str(n),' m = ',num2str(m)])
quiver(X,Y,U,V,1)
0 commentaires
Réponses (1)
Paul
le 11 Déc 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')
plot(A,B2,'b')
axis([0 endv 0 endv]);
title(['n = ',num2str(n),' m = ',num2str(m)])
quiver(X,Y,U,V,1)
Voir également
Catégories
En savoir plus sur Vector Fields dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

