필터 지우기
필터 지우기

Lotka-Volterra, predator -prey

조회 수: 2 (최근 30일)
MariapL
MariapL 2017년 12월 11일
편집: MariapL 2017년 12월 11일
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개)

카테고리

Help CenterFile Exchange에서 Gamma Functions에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by