Starting diary file "diary-2016-02-17.txt" on Wed Feb 17 2016 12:29 PM. swinger swinger(0,2) help ode23tx ODE23TX Solve non-stiff differential equations. Textbook version of ODE23. ODE23TX(F,TSPAN,Y0) with TSPAN = [T0 TFINAL] integrates the system of differential equations dy/dt = f(t,y) from t = T0 to t = TFINAL. The initial condition is y(T0) = Y0. ... clc edit f timespan = [0 10] timespan = 0 10 initial = 1 initial = 1 ode23tx(@f,timespan,initial) xlabel('time t') ylabel('function values y(t)') shg exp( 10/2) ans = 148.4132 edit f % Change to ydot = -y/2; ode23tx(@f,timespan,initial) edit f % Change to ydot = t/2; ode23tx(@f,timespan,initial) ode23tx(@f,timespan,0) [T,Y] = ode23tx(@f,timespan,0); whos Name Size Bytes Class Attributes T 11x1 88 double Y 11x1 88 double ans 1x1 8 double initial 1x1 8 double timespan 1x2 16 double clear edit mylotka ode23tx(@mylotka,[0 20],[300 ; 150]) legend('rabbits','foxes') xlabel('time') ylabel('population') shg ode23tx(@mylotka,[0 20],[15;22]) ode23tx(@mylotka,[0 20],[102 ; 198]) ode23tx(@mylotka,[0 20],[100 ; 200]) ode23tx(@mylotka,[0 20],[2 ; 1000]) [T,Y] = ode23tx(@mylotka,[0 20],[300 ; 150]); whos Name Size Bytes Class Attributes T 128x1 1024 double Y 128x2 2048 double T T = 0 0.0400 0.1649 0.2967 ... 19.7745 19.9030 20.0000 Y Y = 300.0000 150.0000 305.2997 162.6736 310.7456 211.3861 293.5273 276.8071 ... 249.9890 98.2983 280.9754 121.6589 299.7222 146.3971 size(Y) ans = 128 2 plot(Y(:,1),Y(:,2)),shg xlabel('rabbits'); ylabel('foxes') title('Phase Space Plot') shg edit weightf.m ode23tx(@weightf, [0 20], [1/2 ; 0])