Plotting nullclines in prey-predator model
22 views (last 30 days)
Show older comments
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 Comments
Sai Kiran
on 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?
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!