How to plot nullcline in matlab?
조회 수: 29 (최근 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,
댓글 수: 0
채택된 답변
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개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!