Write matlab code to solve tridiagonal linear systems, i.e., systems of the form Ar b where...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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. 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.
Expert Answer:
Answer rating: 100% (QA)
1save the below code in matrixm function xcalculatexab axb xinverseab ... View the full answer
Related Book For
Posted Date:
Students also viewed these mechanical engineering questions
-
Q3) Write MatLab code to select random matrrix of order 3x3 and find its solution by Matrixinverse(10) Q4) Why these commands are used in Matlab1. subplot (m, n, p)2. text (x,y,'text')3. zeros(m,n)4....
-
Matrix Vector Form write each system in Problem 1-3 in matrix vector form. Then write the augmented matrix of the system? 1. x + 2y = 1 2x - y = 0 3x + 2y = 1 2. i1 + 2i2 + i3 + 3i4 = 2 I1 - 3i2 +...
-
A tricirculant matrix is tridiagonal except for its (1. n) and (u. 1) entries. Tricirculant matrices arise in the numerical solution of periodic boundary value problems and in spline interpolation....
-
The following appliances are connected to a single 120 V, 15 A circuit in a kitchen: a 330 W blender, a 1000 W coffeepot, a 150 W coffee grinder, and a 750 W microwave oven. If these are all turned...
-
What critical terms related to the ADA must be considered in evaluating the legal implications of Daves decision? How do they apply in this case?
-
Solve each of the given systems of equations algebraically. x 2 + 7y 2 = 56 2x 2 8y 2 = 90
-
How does a lessee derecognize a right-of-use asset and lease liability over the term of a finance lease?
-
Bad-Debt Reporting Presented below is information related to the Accounts Receivable accounts of Gulistan Inc. during the current year 2010. 1. An aging schedule of the accounts receivable as of...
-
??????? \( \begin{array}{l}\text { (20 points) Write }\left[\begin{array}{c}-5 \\ 1 \\ 5\end{array} ight] \text { as a linear combination of the vectors }\left[\begin{array}{c}-1 \\ 1 \\...
-
Transfer Pricing Case AMP Industries is a multi-national firm built around batteries and the use of batteries in the automotive industry. AMP Industries is made up of two divisions, a Battery...
-
Question # 2 Write recursive descent parser for the given grammar (Using Tree Implementation) (Viva + Code 5+20) begin end | | | ID ; do ( } while ( ); while ( { } if ( ) { } if ( ) ( }...
-
The barrel of a rifle has a length of 0.853 m. A bullet leaves the muzzle of a rifle with a speed of 609 m/s. What is the acceleration of the bullet while in the barrel? A bullet in a rifle barrel...
-
How does an individual's adherence to ethical principles and moral values influence their decision-making processes within complex organizational frameworks, particularly in contexts where...
-
5. dx Find when y x-2x+1 = x+2x-1'
-
On January 1 , 2 0 2 3 Parent held merchandise acquired from Subsidiary for $ 4 0 , 0 0 0 . During 2 0 1 3 Subsidiary sold merchandise to Parent for $ 1 2 0 , 0 0 0 , of which Parent holds $ 2 0 , 0...
-
[s/m] e 0 Acceleration versus Time a1 a2 a3 -1 0 1 2 3 time [s] a2 4 a1 5 = 0, 0 Suppose an object moves in one dimension, starting from rest at time t 6 [The acceleration values ... 0.70 m/s^2; 1.55...
-
Spin-offs that are created to eliminate "non-core" activities help to Blank______. Multiple choice question. compete with parent companies reduce capital requirements lower sale margins secure...
-
For Problem estimate the change in y for the given change in x. y = f(x), f'(12) = 30, x increases from 12 to 12.2
-
Use the finite element method to approximate the solution to the boundary value problem Carefully explain how you are setting up the problem. Plot the resulting solutions and compare your answer with...
-
Find the general real solution to the following systems of differential equations: (a) (b) (c) (d) (e) = 4X1 + 3X2 X2 = 3X1-4X2 ,-- = 3x1-8x2 + 2x3 x2 =-u + 2x2 + 2x3 x3 = x1-4x2 + 2x3
-
Find the first and second derivatives of the functions a. b. c. 0. otherwise 0. otherwise 0. otherwise
-
5. CPA QUESTION An unemployed CPA generally would receive unemployment compensation benefits if the CPA: a. Was fired as a result of the employer's business reversals b. Refused to accept a job as an...
-
6. Debra Agis worked in a Ground Round restaurant. The manager informed the waitresses that "there was some stealing going on." Until he found out who was doing
-
7. The Lillie Rubin boutique in Phoenix would not permit Dick Kovacic to apply for a job as a salesperson. It only hired women to work in sales because fittings and alterations took place in the...
Study smarter with the SolutionInn App