Nullcline plot shows too many nucllines

4 次查看(过去 30 天)
Hi, I'm trying to plot my nullcline for differential equations which depend on parameters alpha1 and alpha2. I want to see how the plot varies depending on these parameters values so I use for loops. However, for some of the plots extra nullclines appear.
here is my code:
clear all
beta = 2;
gamma = 2;
U = 0:0.1:10;
%dvdt = (alpha2./(1+u.^gamma)) -v;
%dudt = (alpha1./(1+v.^beta)) - u;
for i=1:1:5
alpha1 = i;
for j=1:1:5
alpha2 = j;
clear nullclineU
clear nullclineV
nullclineU =@(u) sqrt(u./(alpha1-u));
nullclineV =@(u) (alpha2.*u.^2)./(1+u.^2);
figure(i*j)
plot(U, nullclineU(U), 'b');
hold on
plot(U, nullclineV(U), 'r');
grid on
title(['alpha2 = ', num2str(alpha2), 'alpha1 = ', num2str(alpha1)], 'FontSize', 8);
end
end

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Numerical Integration and Differential Equations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by