Plotting trajectory of variation of two population with the time
Show older comments
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?
Answers (1)
Azzi Abdelmalek
on 23 Jun 2015
Edited: Azzi Abdelmalek
on 23 Jun 2015
plot(x_result(:,1),x_result(:,2))
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!