Question: Q.2 (From Chapter 2 of Numerical Analysis) (a) Write a program that implements the LU factorisation algorithm 2.3, with partial pivoting, given in the Text

 Q.2 (From Chapter 2 of Numerical Analysis) (a) Write a program

Q.2 (From Chapter 2 of Numerical Analysis) (a) Write a program that implements the LU factorisation algorithm 2.3, with partial pivoting, given in the Text and in the supplementary section with MATLAB versions of the algorithms. Your code should have separate functions for the factorization, forward and back-substitution steps. Check your code by analysing the problem solved on page 41 of the Text 1 2 31) (11 3-1 2 (12 (b) (From Chapter 3 of the Numerical Analysis) Implement the least squares fitting algorithm 3.2 given in the Lecture Notes and in the supplementary section with MATLAB versions of the algorithms. Use your LU factorisation program (from part (a) of this question) to solve the linear equations and a separate function to evaluate the various expressions. Check your program by analysing the problem given on pages 67-68 of the Text (c) As an example for an application, you are given the following x-y data representing student attendance at lectures in a particular course point x (week) y (no of students at lecture) 64.0 68.0 60.0 55.0 62.0 64.0 52.0 57.0 10 Use your program to find the coefficients for a least squares fit to these data using the expansion: Write your program in MATLAB so that it prints the value of f(x) at each of the x data points, How well does f(x) fit the data? (30 marks) Q.2 (From Chapter 2 of Numerical Analysis) (a) Write a program that implements the LU factorisation algorithm 2.3, with partial pivoting, given in the Text and in the supplementary section with MATLAB versions of the algorithms. Your code should have separate functions for the factorization, forward and back-substitution steps. Check your code by analysing the problem solved on page 41 of the Text 1 2 31) (11 3-1 2 (12 (b) (From Chapter 3 of the Numerical Analysis) Implement the least squares fitting algorithm 3.2 given in the Lecture Notes and in the supplementary section with MATLAB versions of the algorithms. Use your LU factorisation program (from part (a) of this question) to solve the linear equations and a separate function to evaluate the various expressions. Check your program by analysing the problem given on pages 67-68 of the Text (c) As an example for an application, you are given the following x-y data representing student attendance at lectures in a particular course point x (week) y (no of students at lecture) 64.0 68.0 60.0 55.0 62.0 64.0 52.0 57.0 10 Use your program to find the coefficients for a least squares fit to these data using the expansion: Write your program in MATLAB so that it prints the value of f(x) at each of the x data points, How well does f(x) fit the data? (30 marks)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!