How to increase quiver density
Show older comments
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)
Answers (1)
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)
1 Comment
Joseph Monarres
on 11 Dec 2022
Categories
Find more on Vector Fields in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
