Due Date
See the
calendar for due date.
Description:
For
n = {0,1, ..., 5}, fit a polynomial of degree
n by least squares (using Householder QR Factorization) to the following
data:
t y
0 1.3
1 3.4
2 6.3
3 7.1
4 8.8
5 9.2
Read in the data from a file and make a plot (e.g., using
gnuplot) of the original data points with each resulting polynomial curve.
Which polynomial best captures the general trend of the data?
Why?
Assignment
- Write a solution to the problem using pseudocode
- Write a Fortran program with a subroutine that performs Householder QR Factorization and calculates the coefficients of the polynomials
- Extend the Fortran program with another subroutine that utilizes a LAPACK Householder routine that calculates the coefficients of the polynomials
- Name your variables the same name as the ones used in the textbook
- Write a report (typeset with LaTeX) that:
- Explains what you learned completing this exam
- Describes the process that you went through to come up with the algorithm and the solution
- Reports the polynomials, which one best captures the data and why
- Includes what you did to verify that you obtained the right / good approximation to the problem
- Includes how long it took you to complete this midterm
- Submit the report as a PDF.
Feel free to utilize a Matlab / Octave prototype of your approach.
Rubric:
Points Item
----------- --------------------------------------------------------------
_____ / 10 Pseudocode
_____ / 55 Fortran Householder subroutine (with comments)
_____ / 10 Fortran LAPACK Householder subroutine (with comments)
_____ / 7 Project writeup (overall)
_____ / 9 Project writeup: Algorithm and solution process
_____ / 9 Project writeup: Verification approach
_____ /100 Total
_____ Approximate number of hours spent
Submission
Place the following in a tarball and submit the tarball into the appropriate folder in the dropbox for COMS 6100 at
https://elearn.mtsu.edu:
- Pseudocode
- A makefile that will compile your code correctly
- Fortran source code
- Report (as a PDF)
- Completed rubric (estimates for each line including hours spent)
To make a tarball, do something like the following:
tar -czf hwkHouseholder.tar.gz hwkHouseholder/
Suggestions
- Make progressive progress by printing out intermediate values and checking them against
- Example 3.8 in the textbook (hard code the values from Example 3.1)
- Your prototype solution
- Start with just one value of n, then move to other values
- If your having troubles reading in data from a file, take a break from that and hard code the values. (Don't forget to go back and read in the data from a file.)