TASK: Use a simple model of population exchange between California and the rest of the US.
COMMENT: Suppose that, every year, 30% of the population of California leaves the state, and 10% of the population of the rest of the US moves to California. Is this process chaotic, oscillatory, or does it have a simple tendency?
We will suppose that, in 1960, there were 16 million people living in California, and 164 million Americans living outside of California. If we follow the model, then
1961 CA pop = 1960 CA pop - 0.3 1960 CA pop + 0.1 1960 US pop 1961 US pop = 1960 US pop + 0.3 1960 CA pop - 0.1 1960 US popCompute the CA and US populations from 1961 through 1980, using this model. (In our simple model, we are ignoring births, deaths, and immigration, and just concentrating on where the 180 million people choose to live.)
INSTRUCTIONS:
You will need FOUR special variables: CAOLD and CANEW store the California population; USOLD and USNEW store the non-California US population. Initialize CANEW and USNEW to the 1960 values. Set up a for loop that runs from YEAR = 1961 to YEAR = 1980. Copy CANEW into CAOLD. COPY USNEW into USOLD. Write the formula for CANEW based on CAOLD and USOLD. Write the formula for USNEW based on CAOLD and USOLD. Print YEAR, CANEW, USOLD End of your loop
CHECK: Using our numbers, your first calculation should be:
1961 27.6 152.4
SUBMIT: Your work should be stored in a script file called "hw0115.m". Your script file should begin with at least three comment lines:
% hw0115.m % YOUR NAME % This script (describe what it does) % Add any comments here that you care to make.If this problem is part of an assignment, then submit it to Canvas.