Plotting nullclines in prey-predator model

22 Ansichten (letzte 30 Tage)
Doaa Mahmoud
Doaa Mahmoud am 17 Okt. 2022
Kommentiert: Doaa Mahmoud am 23 Okt. 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 Kommentare
Sai Kiran
Sai Kiran am 20 Okt. 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 am 23 Okt. 2022
thanks alot for replying.
I knew what was the problem.it was value of one constant was incorrect

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by