3D Phase portrait for a set of differential equations
89 views (last 30 days)
I have a set of three differential equations and I want to make a phase portrait of them. I have some idea of using quiver or plot3 to get a phase portrait of a set of 3 differential equations. I am unable to do for this case.
Here is my attempt:
[t,y] =ode45(@(t,y) fn(t,y),timerange, IC);
[t1,y1] =ode45(@(t,y) fn(t,y),timerange, IC1);
function rk1 =fn(t,y)
r=0.00173;K=0.03166;A0=0.4;gammaA=0.04;eps = 0.00055;rho= 0.025;alpha1= 1.30187;c1=0.63433;
rk1(1)= r*n*(1- n/K)+ alpha*A*n -eps*n*I;
rk1(2) = A0 - gammaA*A;
rk1(3) = I0 + (rho*I*n)/(alpha1+n) -c1*I*n - gammaI*I;
What I am doing is merely changing the initial conditions The actual result should be something like this.
Any help would be greately helpful. This is what I am getting from above code.
darova on 25 Apr 2020
I tried to plot T A and I separately. X Y Z axis represents T A and I respectively. Color represents derivative of T A or I
I used surface to plot color lines (plotted curves as surfaces, made them nx2 size)
derivative just difference