Plotting trajectory of variation of two population with the time
Ältere Kommentare anzeigen
I have this differential equation that describes the variation of two populations:
function [dxdt]= raueber(t,x,m)
dbdt=x(1)^1*(1-x(1))-x(2)*x(1);
drdt=x(1)*x(2)-m*x(2);
dxdt=[dbdt; drdt];
I already solved the ODE with:
[time,x_result]=ode15s(@raueber,tspan,X0,'',m1);
dxdt = raueber(time,x_result,m1);
and before I gave all the parameters and values.
Now I'd like to plot the trajectory, wich means B on the x-axes and R on the y-axes. I tried:
plot(x_result(1), x_result(2))
but it's not worthy.. any suggestion?
Antworten (1)
Azzi Abdelmalek
am 23 Jun. 2015
Bearbeitet: Azzi Abdelmalek
am 23 Jun. 2015
plot(x_result(:,1),x_result(:,2))
Kategorien
Mehr zu Ordinary Differential Equations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!