function out=compute_ratios(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 ratios between the values, for estimating a linear fit. 

out=zeros(1,n-1);

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

