Question 2 - Logistic equation
Using ode23 to solve the logistic equtions with various initial conditions and two time intervals: and
.
We plot both time intervals for a single initial condition on the same plot for convenience
Contents
[t1,x1] = ode23(@logistic, [0,3], 0.5); [t2,x2] = ode23(@logistic, [0,-1], 0.5); plot(t1, x1, t2, x2); xlabel('t') ylabel('x')

[t1,x1] = ode23(@logistic, [0,3], 1.5); [t2,x2] = ode23(@logistic, [0,-1], 1.5); plot(t1, x1, t2, x2); xlabel('t') ylabel('x')

[t1,x1] = ode23(@logistic, [0,3], 1); [t2,x2] = ode23(@logistic, [0,-1], 1); plot(t1, x1, t2, x2); xlabel('t') ylabel('x')

[t1,x1] = ode23(@logistic, [0,3], -0.05); [t2,x2] = ode23(@logistic, [0,-1], -0.05); plot(t1, x1, t2, x2); xlabel('t') ylabel('x')
