function out = project_percent(G,P,F,I,regionid,percent)
% out = project_percent(G,P,F,I,regionid,percent)
% Purpose: Projects population at 5 year increments until 2030 according 
%     to P(t+5) = G*P(t)+F*I(t).  Allows the percentage of immigrants to 
%     change over time.  
%     By specifying regionid and percent, you can allow the proportion of
%     immigrants going to one region to change over time.
% Input:
%     G = Growth matrix
%     P = 1990 population vector
%     F = Immigrant redistribution matrix
%     I = 1990 immigrant vector
%     regionid = region to be changed
%     percent = percent of immigrants going to region in 2030
% Output:
%     A matrix of population vectors.  Column 1 is the population in 
%     1990, and the last column is the population in 2030;
out = P;
cur_pop = I(regionid:9:315+regionid);
cur_percent = sum(cur_pop)/sum(I);
perc = cur_percent:(percent-cur_percent)/7:percent;
for i = 1:8
    out(:,i+1) = G*out(:,i)+F*change_percent(I,regionid,perc(i));
end;