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 CenterFile Exchange에서 Programming에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by