Reference no: EM133146269
Question 1. Bilinear interpolation
Task 1.1 Write a Matlab script using the 'bilinear interpolation method' to interpolate points in the domain [-5, 5] x [-5, 5]. The function values of the four corner points are evaluated with f(x, y) = exp(x)/10 - sin(y), respectively: f (-5, -5), f(5, -5), f(5,5) and f(-5, 5).
Task 1.2 Interpolate at least 9 points in between the corner points.
These 9 points shall be chosen arbitrarily. Visualize the corner points and the interpolation points with a grid plot.
Task 1.3 Compare the interpolated values with the exact values given by f(x, y) = exp(x)/10 - sin(y) and summarize the results.
Task 1.4 Visualize the function and the interpolated values with e.g. Matlab function 'surf'.
Question 2. QR decomposition
Task 2.1 Write a Matlab code to calculate the QR decomposition of a real 5 x 5 matrix using the Gram-Schmidt process.
Task 2.2 Define an orthogonal matrix Q and an upper triangular matrix R with A = Q.R to test your program.
Task 2.3 Extend the code to solve the system A.x = b, where b needs to be set accordingly, and compare the result with the built in Matlab function A \ b.