Nullcline plot shows too many nucllines

3 visualizaciones (últimos 30 días)
Myriam Ghali
Myriam Ghali el 19 de Nov. de 2018
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

Respuestas (0)

Categorías

Más información sobre Ordinary Differential Equations en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by