How to plot nullcline in matlab?

29 ビュー (過去 30 日間)
wenjie qian
wenjie qian 2017 年 5 月 5 日
コメント済み: wenjie qian 2017 年 5 月 5 日
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));
  1 件のコメント
wenjie qian
wenjie qian 2017 年 5 月 5 日
thank you so much!!! It does work out!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by