Nullcline plot shows too many nucllines

3 ビュー (過去 30 日間)
Myriam Ghali
Myriam Ghali 2018 年 11 月 19 日
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 Center および File ExchangeOrdinary Differential Equations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by