%This is a function for resource dynamics of nospec species and one resource
function res1plotsp2(specpara,supply,loss,lag,nostep)
% species parameters
% growth: growth per unit biomass
% uptake: uptake per unit growth
% mortality
% n0 initial size

%resource parameters:
%           supply: resource supply 
%           loss: rate at which resource is removed

   n = res1(2,specpara,supply,loss,lag,nostep)
   hold on;
   axis([0, 1.2*max(n(1,:)),0, 1.2*max(n(2,:))])
   xlabel('Species 1');
   ylabel('Species 2'); 
   
   for t=1:nostep-1
      plot(n(2,t:t+1),n(3,t:t+1),'r')
      axis([0, 1.2*max(n(2,:)),0, 1.2*max(n(3,:))])
      pause(0.2)
   end
   
