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 CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by