Great Deal! Get Instant \$10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

# Math 232 – Computing Assignment 3 Due Date: November 18th, at 11:00pm. You must upload to Crowdmark both your code (as a .pdf file) (to Code - Computing Assignment 3) and your report (to Report -...

Math 232 – Computing Assignment 3
Due Date: November 18th, at 11:00pm.
You must upload to Crowdmark both your code (as a .pdf file) (to Code - Computing Assignment
3) and your report (to Report - Computing Assignment 3). The assignment is due at 11:00pm.
If Crowdmark indicates that you submitted late, you will be given 0 on the assignment. You
computing report must be exactly 1 page. There will be a penalty given if your report is longe
than one page.
• Keep in mind that Canvas discussions are open forums.
• Acknowledge any collaborations and assistance from colleagues/TAs/instructor.
Programming Preamble:
Matlab: You need to be able to enter column vectors and matrices.
Matlab: You need to be able to multiply a matrix by a vector.
Matlab: You need to be able to draw lines on the same figure.
Matlab: help plot gives you all the information you need to make your plots look good - labelling
the axes, putting on a title etc.
Matlab: Use a for loop (see Matlab documentation) to repeatedly multiply your age distribution
vector x⃗t by your transition matrix A for a specified number of times. This little bit of script could
e modified for this purpose;
y=x1;
for i=1:10
y2=A*y;
XX(:,i)=y2;
y=y2;
end
Here, the matrix XX stores the vectors y2 that are iterates of the vector x1 as its columns, and
these columns can be plotted individually.
Computing Assignment
Required submission: 1 page PDF report and Matlab or Python code (.m or .py respectively,
exported as a .pdf) uploaded to Canvas.
Population Dynamics
This assignment is designed to show you a basic model used to describe and predict population
dynamics. Please read pages XXXXXXXXXXof the secondary textbook (Boyd and Vandenberghe, available
as a .pdf from Canvas).
1
These websites may be useful to refer to while working on this assignment;
https:
www150.statcan.gc.ca/t1/tbl1/en/tv.action?pid= XXXXXXXXXX
https:
https:
www150.statcan.gc.ca/t1/tbl1/en/tv.action?pid= XXXXXXXXXX
Death rates;
https:
www150.statcan.gc.ca/n1/pu
71-607-x/71-607-x XXXXXXXXXXeng.htm
https:
www150.statcan.gc.ca/n1/pu
71-607-x/71-607-x XXXXXXXXXXeng.htm
Let x⃗t, (x⃗t)i = number of people in Canada with age i − 1 in year t (say, on Jan 1 of that year),
i = 1, . . . , 100, where t = 0 denotes the year 2000.
The birth rate is given by a vector b⃗, (⃗b)i, i = 1, . . . , 100.
The death rate is given by a vector d⃗, (d⃗)i, i = 1, . . . , 100.
1. Find age distribution, birth rate, and death rates for Canada (like Figures XXXXXXXXXXin the
ook by Boyd and Vandenberghe are for the US) by utilizing the internet.
2. Formulate a discrete dynamical model as described in those pages from the book by Boyd
and Vandenberghe. In particular, make sure you specify your transition matrix in the cases
elow.
3. From your model, make plots of the age distribution in Canada for the years 2028, 2033, and
2038 (5, 10, and 15 years from now), similar to Figure XXXXXXXXXXplots on one graph, different
colours each). For example, the following piece of code can be modified for this;
plot(XX(:,1),’b-’)
hold on
plot(XX(:,5),’r-’)
hold on
plot(XX(:,9),’k-’)
(with axis and lines suitably labeled)
4. Now make a modification of your model (i.e., the transition matrix A) incorporating immi-
gration. Make a simple assumption of what the average immigration rate is per year based
on data you find on the web (for example, immigration could only affect the population dis-
tributions of people between the ages of 20 and 40). Plot again the predicted population
distribution for Canada for the years 2028, 2033, and 2038 from this new model.
5. What other factors do you think would make this model more realistic or more accurate?
2
Answered Same Day Nov 18, 2022

## Solution

Baljit answered on Nov 18 2022
I have used data of year 2020 in my model.
Age distribution plot for 2028,2033 and 2038.
Age distribution with immigration plot for 2028,2033 and 2038.
Some other factor that make our model more accurate that To subtract population that is migrated from Canada. Some time there are certain death...
SOLUTION.PDF