MATLAB: Can anyone help me with the ode

odeode45

Can anyone help me with my code.
Here is my separate .m file for my ode:
function ndot= volterra_allelo(t,n)
global r1 k1 alpha12 gamma12 r2 k2 alpha21 gamma21
ndot(1,1)= r1*n(1)*((k1-alpha12*n(2)-gamma12*n(2))/k1) ;
ndot(2,1)= r2*n(2)*((k2-alpha21*n(1)-gamma21*n(1))/k2) ;
to call for the ode, my code is as follows:
global r1 k1 alpha12 gamma12 r2 k2 alpha21 gamma21
r1= 1.03;
k1=450000;
alpha12=66.9215;
alpha21=23.6692;
r2=0.61;
k2=324000;
gamma12=-8.0819e-06;
gamma21=-1.9182e-06;
[time,n]=ode45('volterra_allelo',[0 20],[1.2658e+04/2; 6.3095e+03/2]);
These codes are now working. I always get an error
Can anybody help me with this. Thanks

Best Answer

[time,n] = ode15s(@volterra_allelo,[0 20],[1.2658e+04/2; 6.3095e+03/2]);