# essay | matlab代写 | report代做 | Algorithm代写 | 代写angular | assignment | lab代做 – CHM2130 Computational Mathematics 2

### CHM2130 Computational Mathematics 2

essay | matlab代写 | report代做 | Algorithm代写 | 代写angular | assignment | lab代做 – 这是一个关于essay的题目, 主要考察了关于matlab的内容,是一个比较经典的题目, 涵盖了essay/matlab/report/Algorithm等方面, 这个项目是assignment代写的代写题目

### assignment 2018/

The specification below details the programming challenges for your assignment and the

essay question ; which you must complete in no more than two pages of A4 at a font size of

Please read the details below very carefully and ask me if you are not totally clear about

what you must complete and what you must submit.

The programing component of your assignment must be built up in four clearly separate stages. Each modification that you make to the previous code must be saved using a different name. I suggest that you use the naming convention: stage1.m, stage2.m, stage3.m and stage4.m. Each stage (apart from the first) should be fully annotated and clearly extend the previous stage.

For each stage that you complete, you must fully test your function using appropriately defined test data. It is your responsibility to identify what is appropriate to fully test your code.

Programming Challenges:

For part of this assignment you will build, in four separate stages, a Matlab implementation of the LU factorisation method for solving large, square systems of linear equations. Please read the instruction for each stage below:

Stage 1: Write a Matlab function that will take as input any size of real, square, unit lower tri angular matrix L together with a right-hand-side vector b and which computes and outputs the solution x to the triangular system of equations L x = b using forward substitution. Your function should employ, as a minimum, checks for dimensional compatibility and deal with incompatible cases appropriately. Your function should have the header:

``````function [x] = stage1(L, b)
``````

Stage 2: Modify the Matlab function written for Stage 1 to take as input any size of real, square, upper triangular matrix U together with a right-hand-side vector b and which computes and outputs the solution x to the triangular system of equations U x = b using back substitution. All checks should be updated appropriately. Your function should have the header:

``````function [x] = stage2(U, b)
``````

Stage 3: Write a Matlab function that will take as input any size of real, square matrix A and which computes and outputs the factorised components L and U such that LU = A. You must implement the factorisation method taught in the module and not use any in-built function in Matlab. Relevant checks should be made where required. Your function should have the header:

``````function [L U] = stage3(A)
``````

Stage 4: Write a Matlab function that solves a square system of linear equations A x = b using the LU factorisation method. You should take as input any size of real, square matrix A and right-hand-side vector b and output the solution x if it exists. Your function should employ checks for dimensional compatibility and deal with incompatible cases appropriately. You should:

1. Use stage 3 .m to factorise your matrix into its L and U components. (See note below if you have not managed to do this)
2. You should calculate the determinants of the triangular factors to determine whether a solution to the system of equations exists
3. If a solution does not exist your function should display an appropriate message. If a solution does exist, it should be determined using your stage1.m and stage 2 .m functions.

Your function should have the header:

``````function [x] = stage4(A, b)
``````

NOTE: if you have not been successful in completing Stage 3, I will provide a number of factorised square matrices for you to be able to complete Stage 4.

Stages 1 to 4: What you should submit for your report :

`````` A brief introduction to the assignment and a table of contents
You should include fully annotated details of all your code for each stage
You should clearly explain, justify and document a testing strategy for each stage.
``````

Essay question:

A potential extension to the Gaussian elimination method for solving square systems of linear equations is the Gauss-Jordan method. Your essay should be divided into two parts:

Part 1 : Describe what Gauss-Jordan elimination is. You should describe the Algorithm as fully as possible and explain how it is used to calculate the inverse of a square matrix.

Part 2 : Describe how the Gauss-Jordan elimination method can be used to solve a square system of linear equations. In your answer you should explain how this method extends the Gaussian elimination approach. You should discuss any potential advantages and disadvantages of employing this method in relation to other methods developed in the module so far. Use facts drawn from the literature not your own opinion.

Your essay should link concepts together in a coherent way. For both parts you will need to research what Gauss-Jordan elimination is and describe it using appropriate mathematical notation. You should fully reference your essay and credit your sources (these should come from credible papers/books etc. mathsisfun.com and other dubious websites will not gain marks). Please use the APA 6th referencing standard in your essay (https://library.hud.ac.uk/pages/apareferencing).