Home > other >  Where I the wrong... Save the children
Where I the wrong... Save the children

Time:12-15

The function f=fun (t, x)
R1=1; R2=0.4; R3=0.2; A=0.1; B=0.05; C=0.1; D=0.03; X10=10000; X20=1000; X=100;
F=[x (1) * (r1 - a * x (2)), x (2) * (r2 + b * c * x x (1) - (3), (3) * x * x (r3 + d (2))];

[t, x]=ode45 (' fun ', [0], [10000100] 0100)
Subplot (1, 2, 1)
The plot (t, x (:, 1), '-', t, x (:, 2), '-', t, x (:, 3), ':')
Legend (' x1 (t) ', 'x2 (t)', 'the x3 (t))
The grid
Subplot (1,2,2)
Plot3 (x (:, 1), x (:, 2), x (:, 3))
The grid




The error is in the ode
[t, x]=ode45 (' fun ', [0], [10000100] 0100)
Error using odearguments (line 93)
FUN must return a column vector,

Error ode45 (line 115)
Odearguments (FcnHandlesUsed solver_name, ode, tspan, y0, options, varargin).
  • Related