[SOLVED] C matlab MAE 495/589, Computational Methods in Engineering Fall 2019

$25

File Name: C_matlab_MAE_495/589,_Computational_Methods_in_Engineering_Fall_2019.zip
File Size: 640.56 KB

5/5 - (1 vote)

MAE 495/589, Computational Methods in Engineering Fall 2019
Project 1 (Construct a Cubic Spline)
Handed out: October 14, 2019
This project is intended to augment your understanding of interpolation, cubic splines, numerical integration, linear least-squares fitting, and numerical solution to a linear system.
1. Write a program for the not-a-knot cubic spline interpolation. The input is a set of orderly discrete points.
2. Run your program for the Runge function, which is defined by
f(x)= 1 for x[1,1] 1+252
Obtain the cubic spline using 5, 9, 17, and 33 equally spaced points, whose x-coordinates are given by
xi=x0+xnx0i, i=0,1,,n1 n1
respectively, where x0=-1, xn=1, and n is the number of points used for the interpolation. Plot the resulting cubic polynomials and compare it with the Runge function.
Compute the L2-norm of the error function defined by
No of sub-intervals
e 2 = ( Pi ( x ) f ( x ) ) 2 d x
i=1 Ii
where Pi(x) is the interpolating cubic spline polynomial on the subinterval i. The Gauss quadrature formula can be used for computing the above integration.
Plot log(||e||2) vs log(the length of the subintervals).
Use a linear polynomial to fit these four data points and make an observation about the value for the slope of this line. What number should it be? why? Do you get this number? Why ?
3. (Optional for undergraduates, although you are encouraged to try it. Extra credits will be given.) Modify and revise your program, so it is able to construct a cubic spline for a set of data points with repeated abscissae and ordinates. State your approach. Test it for the following 9 points in a unit cycle: (1,0), (0.7071,0.7071), (0,1), (-0.7071,0.7071), (-1,0), (-0.7071,-0.7071), (0,-1), (0.7071,-0.7071) and (1,0). Plot the resulting cubic polynomials and compare it with the analytical function.
4. Project report should be written in the style of a technical paper, with abstract, introduction, description of methodology, results, conclusions, and references sections clearly outlined.
5. E-mail me your Matlab, Fortran or C program.
This is not a trivial project; please start early and devote time to it.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] C matlab MAE 495/589, Computational Methods in Engineering Fall 2019
$25