PHYS 27/193: Homework 6
Type your numerical answers in a text file,
save it as NAMEhw6.txt, along with PDF plots,
and email them to me as attachments (if you like you can
tar them together in one tar file).
- Using your "CalPop.dat" file, fit the US Population data
to a cubic function: f(x) = a3*x**3 + a2*x**2 + a1*x + a0.
Find a3, a2, a1 and a0. Report the
values in your "NAMEhw6.txt" file.
- Plot the data along with your fit function.
- Make a PDF copy of this plot called "NAMEUSpopfit.pdf".
- Predict the US population in 2050, and in 2100?
- Do the same for the California population.
Note that if you want to fit to data in columns 1 and 3,
you can put a "using"
after the "filename" in a fit command, the same way you
do when using "u..." (using) in a plot command.
For example: fit f(x) "CalPop.dat" u 1:3 via...
- Plot the ratio of CA population to US population vs. year,
by employing the using command.
Save a PDF called "NAMEpopratio.pdf"
- Fit this ratio to a line. What is the slope of this line?
Save a PDF of this called "NAMElinefit.pdf".
- In what year will the CA/US fraction of US population be 15% at
current growth rates? When will the CA/US fraction be 1/4?
Go to this page to see a worked example
using the freefall data you made in homework 4.