% Script to show the predator prey solutions. % Uses predator1.m for the equations N=10; %Number of solutions to plot x0=6*rand(2,N); tspan=0:0.05:9; figure(1) for j=1:N [t,y]=ode23s(@predator1,tspan,x0(:,j)); plot(y(:,1),y(:,2)); if j==1 hold on end end hold off figure(2) %Example: Plot as a time series, expand one solution: x0=[3;1]; [t,y]=ode23s(@predator1,0:0.05:27,x0); plot(t,y(:,1),t,y(:,2)) axis tight figure(1)