Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Why curves don't appear in the numerical solution?

1 visualización (últimos 30 días)
Esraa Abdelkhaleq
Esraa Abdelkhaleq el 1 de Jul. de 2017
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
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'])

Respuestas (1)

Walter Roberson
Walter Roberson el 1 de Jul. de 2017
??
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.

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by