Info

此问题已关闭。 请重新打开它进行编辑或回答。

Why curves don't appear in the numerical solution?

1 次查看(过去 30 天)
I want to solve an ODE system numerically. The numerical solution for the model equations should give two curves and four hlines, two of these hlines must intersect with the two curves. I need to find the points of intersections between the two hlines and the two curves.
But the solution gives 6 hlines which means that the two curves appear as lines not curves. Where is the mistake?
The code:
syms t x ai di Kgr dc fc Rc fi_Ri Kei Kec fch_Rch_Nh0 fih_Rih_Nh0
g = @(t,x,ai,di,Kgr,dc,fc,Rc,fi_Ri,Kei,Kec,fch_Rch_Nh0,fih_Rih_Nh0)[Kgr*x(1)-dc*x(1)*x(2);ai*x(1)-di*x(2);fc*Rc*x(1)+fch_Rch_Nh0-Kec*x(3);fi_Ri*x(2)+fih_Rih_Nh0-Kei*x(4)]
ai=0.0474; di=0.1131; Kgr=5.78*10^(-3); dc=0.2*10^(-6); fc=0.1; Rc=4.5*10^(-5); fi_Ri=10.925*10^(-6); Kec=0.11; Kei=2.14;fch_Rch_Nh0=4.56*10^(3); fih_Rih_Nh0=7.16*10^(4) ;
cutoff1=34.11*3150; cutoff2=3.8*3150; threshold1= 1.5*3150; threshold2= 1*3150;
[t,xa] = ode45(@(t,x) g(t,x,ai,di,Kgr,dc,fc,Rc,fi_Ri,Kei,Kec,fch_Rch_Nh0,fih_Rih_Nh0),[0 4000],[1 1 0 0]);
figure
plot(t, xa(:,3),'r')
hline1=refline(0,cutoff1);
hline2=refline(0,threshold1);
set(hline1,'color','g','LineStyle','--')
set(hline2,'color','g','LineStyle','-')
hold on
plot(t, xa(:,4),'b')
hline3=refline(0,cutoff2);
hline4=refline(0,threshold2);
set(hline3,'color','m','LineStyle','--')
set(hline4,'color','m','LineStyle','-')
xlabel ('Time')
ylabel ('Blood Biomarker Concentration')
title(['Tumor & Immune Biomarkers Shedding also by Healthy Cells'])

回答(1 个)

Walter Roberson
Walter Roberson 2017-7-1
??
The code you posted displays one visible reference line, hline4. The others are up at the very top, overlaying the top axes, as they are above the maximum for the data.

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by