Plotting nullclines in prey-predator model

22 次查看(过去 30 天)
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 个评论
Sai Kiran
Sai Kiran 2022-10-20
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 2022-10-23
thanks alot for replying.
I knew what was the problem.it was value of one constant was incorrect

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by