フィルターのクリア

Lotka-Volterra, predator -prey

3 ビュー (過去 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 Center および File ExchangeOrdinary Differential Equations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by