Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 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

Step: 1

1save the below code in matrixm function xcalculatexab axb xinverseab ... 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

Applied Linear Algebra

Authors: Peter J. Olver, Cheri Shakiban

1st edition

131473824, 978-0131473829

More Books

Students also viewed these Mechanical Engineering questions