MATLAB: Population growth in 7 years

exponential equationgraphpopulation growth

Hi,
I want to make a graph that will calculate how the population will change in 7 years in a spesific country. Say in 2018 there is approximately 5 million people in a country, and the growth rate is 0.63%. What will the approximated population be in 2025? Is there anyone that can help me code this.
I have already calculated this using expontential euqation:
y= a(1+r)^t
P = 5(1.0063)^7
P = 5.22 million

Best Answer

% rate
r = 0.0063;
% years
t = 7;
% initial population
a = 5e6;
% population
y = a*(1+r)^t