PROJECT 2: Subroutines
Part 2b
Problem Statement
- Write Subroutines integrate.f and interpolate.f
- integrate.f
- Trapezoidal rule
- Data in are passed through the argument list
as an array
- Data out is passed through the argument list
- 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
- 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.
(use /home/aeem/lockers/wilson/programs/dgefs.
-
-
integrate the interpolated data over the entire interval
Note: source codes are to be well documented and structured
Submit
-