function out=compute_change(pop_vec,n)
%This function takes as input a vector of population values (pop_vec) and its length (n) and returns the vector of length n-1 consisting of the sequential differences, or change, between the population values. 
out=zeros(1,n-1);

for i=1:n-1
    out(i)=pop_vec(i+1)-pop_vec(i);
end

