Question: Write matlab code to solve tridiagonal linear systems, i.e., systems of the form Ar b where A is tridiagonal. This code must be in

Write matlab code to solve tridiagonal linear systems, i.e., systems of the

Write matlab code to solve tridiagonal linear systems, i.e., systems of the form Ar b where A is tridiagonal. This code must be in the form of a function. The inputs to the function should be in the form of vectors for the diagonal, lower-diagonal and upper-diagonal elements of the matrix and the vector right-hand side of the equation. Write a script that calls the function, and which also checks its output by computing Ar b, where A is in its matrix form. Apply your code to solve Ar = b, and check the solution (by computing the Euclidean norm of A b where is your computed solution), where 2 10 0 2 6 3 0 2 0 1 6 0 0 2 8 0 0 0 -2 0 0 0 3 A = and b = -1 9 -3 1 8 6.

Step by Step Solution

3.36 Rating (159 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

1save the below code in matrixm function xcalculatexab axb xinverseab ... View full answer

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 Mechanical Engineering Questions!