% Starting diary file diary-10-Nov-2010.txt swinger swinger clc timespan = [0 10] ode23tx(@f,timespan,1) ylabel('function values y(t)') xlabel('time t') exp(10/2) hold on plot(1:10,exp((1:10)/2),'r') edit f ode23tx(@f,timespan,1) % use ydot = -y/2 ode23tx(@f,timespan,1) % use ydot = t/2 ode23tx(@f,timespan,1) % use ydot = some randomly chosen function of t and y clc edit mylotka timespan = [0 20] ode23tx(@mylotka,timespan, [ 300 ; 150 ]) legend('rabbits','foxes') xlabel('time') ylabel('population') ode23tx(@mylotka,timespan, [15,22 ]),shg legend('rabbits','foxes') ode23tx(@mylotka,timespan, [ 102; 198 ]) ode23tx(@mylotka,timespan, [ 100 ; 200 ]) ode23tx(@mylotka,timespan, [ 300 ; 150 ]) help ode23tx [T,Y] = ode23tx(@mylotka,timespan, [ 300 ; 150 ]); T Y plot(T,Y(:,1)) size(T) size(Y) plot(Y(:,1),Y(:,2)) xlabel('rabbits') ylabel('foxes') title('Phase Space Plot') swinger diary off