PROJECT 2: Subroutines

Part 2b

Problem Statement

  1. Write Subroutines integrate.f and interpolate.f
    1. integrate.f
      • Trapezoidal rule
      • Data in are passed through the argument list as an array
      • Data out is passed through the argument list
    2. interpolate.f
      • Quadratic Spline
      • Data in are passed through the argument list as an array
      • Number of interpolated points (equally-spaced) passed through argument list
      • Data out are passed through the argument list as an array
  2. Test the Subroutines Write a main program to test the subroutines.
      Main.f will
    • input the data points in /home/lockers/wilson/data/data2b.dat
    • determine and output 20 equally spaced interpolated points to a file (link with /home/aeem/lockers/wilson/programs/dgefs.f).
    • integrate the interpolated data over the entire interval
NOTE:
Use double precision throughout
Source codes are to be well documented and structured

Submit

  1. all source codes
  2. make file
  3. include files
  4. input files
  5. list of interpolated output data
  6. plot of original data &interpolated data
    on one graph, points only (no lines)
  7. the full LHS matrix (A) sent to dgefs
  8. final integrated answer

Due: January 28, 11:50AM