Plotting nullclines in prey-predator model

9 vues (au cours des 30 derniers jours)
Doaa Mahmoud
Doaa Mahmoud le 17 Oct 2022
Commenté : Doaa Mahmoud le 23 Oct 2022
I want to plot these four function and I tried this code but I have a problem plotting "fs1" and "fs2" becaue I need each one of them to be plotted as one curve.
I realy need your help
Best Regards
clc
clear
close all
a=0.7;
b=0.6;
r=1.5;
k=12;
beta=0.5;
delta=0.25;
q1=0.25;
q2=0.1;
ET=5;
x=linspace(0, 10, 100);
fs1= (r.*x.*(1-x./k))./(a-b*r.*(1-x./k));
gs1= (x.*(a*beta-delta))/(b*delta);
fs2= -(x.*(k*(q1-r)+r.*x))./(a*k+b*k*(q1 - r)+b*r.*x);
gs2= -(x.*(q2+a*beta-delta))/(b*(q2-delta));
plot(x,fs1,'Color','k','LineWidth',1.5)
hold on
plot(x,gs1,'Color','g','LineWidth',1.5)
plot(x,fs2,'Color','b','LineWidth',1.5)
plot(x,gs2,'Color','r','LineWidth',1.5)
xlim([0 10])
ylim([0 20])
  2 commentaires
Sai Kiran
Sai Kiran le 20 Oct 2022
Hi,
I have a doubt regarding your query.
Do you want to plot fs1 and fs2 variables in the same plot? and gs1 & gs2 on another plot?
Can you please elaborate your query?
Doaa Mahmoud
Doaa Mahmoud le 23 Oct 2022
thanks alot for replying.
I knew what was the problem.it was value of one constant was incorrect

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Programming dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by