Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Relational Theory Normal Forms And All That Jazz

Authors: Chris Date

1st Edition

1449328016, 978-1449328016

More Books

Students also viewed these Databases questions