function n = maysingle(r,k,n0,nostep) %calculates one time series of the May's equation %r - growth rate %k - carrying capacity %n0 - initial population size %nostep - number of steps for simulation %noise - absolute noise (value set within the function) noise = 0; n = [n0]; for t=1:nostep %nprime = poisr(r*n(t)*(k-n(t))/k,1); nprime = r*n(t)*(k-n(t))/k + randn*noise; if nprime < 0 nprime = 0; end n =[n nprime]; end