Lotka-Volterra, predator -prey
조회 수: 3 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!