Lotka-Volterra, predator -prey
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi everyone I need to see how the model of lotka volterra is behaving. I have the data, X-prey , Y-predators, and I have symulated the paramters, It looks like below. For some reason it does not want to work. x=[628 703 778]; y=[1771 1403 1035]; There are numbers of rabbits and foxes in following years. Parameters as as follow: alpha = -0.075693; beta = 0.000022467; delta= -0.063939; gamma = 0.000031045;
Model looks like this: dx/dt = alpha * x - beta * x * y; dy/dt = - delta * x + gamma* x*y; I want see how this equation will look like with my data, and see phase portrter of it. I have computed code as below, but its not working. :/ Any help will be much appreciated.
function dx = lotkamath2(t, x)
dx = [0; 0];
alpha = -0.075693;
beta = 0.000022467;
delta= -0.063939;
gamma = 0.000031045;
x=[628 703 778];
y=[1771 1403 1035];
dx(1) = alpha * x - beta * x * y;
dx(2) = - delta * x + delta * x*y;
%options = odeset('RelTol', 1e-4, 'NonNegative', [1 2]);
[t,x] = ode45('lotkamath2', [0 3], [628 1771]);
plot(t,x);
legend('prey', 'predators');
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Gamma Functions dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!