How to plot nullcline in matlab?

27 次查看(过去 30 天)
Hi guys, I need to plot a set of ODEs' nullclines,
dL/dt = beta*Lext*Y-gamma*L;
dY/dt = delta+kfeed*L^4/(Kmfeed+L^4)-sigma*Y
here is my code:
beta=1; gamma=1; delta=0.2; Kmfeed=20; kfeed=2; sigma=1; Lext=2;
nullclineL=@(L)gamma.*L/(beta*Lext);
nullclineY=@(L)delta/sigma+kfeed.*L.^4/(sigma*(Kmfeed+L.^4));
L=1:.1:20;
figure(3)
plot(L,nullclineL(L),'b','LineWidth',2); hold on;
plot(L,nullclineY(L),'r','LineWidth',2);
the question is that i cannot get the second plot result, but i don't know what is wrong with that? Thanks for reading and possible help.
but I don't don't know why i cannot get the second plot reslut,

采纳的回答

John D'Errico
John D'Errico 2017-5-5
编辑:John D'Errico 2017-5-5
It seems like you understand the need for .^ operators here. So why have you not chosen to use ./ when appropriate? (The .* operator can also be valuable, but it is not the problem here.)
Think about my question, then look at this line of code, as written by you:
nullclineY=@(L)delta/sigma+kfeed.*L.^4/(sigma*(Kmfeed+L.^4));

更多回答(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