Advanced Engineering Mathematics
Advanced Engineering Mathematics
10th Edition
ISBN: 9780470458365
Author: Erwin Kreyszig
Publisher: Wiley, John & Sons, Incorporated
Bartleby Related Questions Icon

Related questions

Question

Please answer part(s) 1- (C) and 2

1) a) Write a Matlab function program thomas(e.f.g.r.n) based on the pseudocode below which
solves a tridiagonal system of n linear algebraic equations. Here e, fand g are vectors
containing the tridiagonal elements of the coefficient matrix, r is the right hand side vector and
x is the solution vector.
₁82
ef 83
C-1 fa-1 B-1-1
er
f. J x₂
(a) Decomposition
DOFOR K = 2, n
ek =
ex/fk-1.
fk = fk - ek 9k-1
END DO
(b) Forward substitution
DOFOR K = 2, n
rk = rk ek rk-I
END DO
(c) Back substitution
Xn = rn /fn
DOFOR k = n -1. 1, -1
Xx=(rk 9k Xx+1)/fk
END DO
FIGURE 11.2
Pseudocode to implement the
Thomas algorithm, an LU
decomposition method for tridi-
agonal systems.
7₂
73
b) Write a Matlab main program which calls the function program developed in part (a) to solve
the following tridiagonal system
1
3
[x1
5 x₂ =
-2
-4
-6 7
c) Solve the tridiagonal system of equations in part (b) manually using the Thomas algorithm in
part (a). Show the expression and the numerical value of each variable as it is computed.
2) After scaling the coefficient matrix given in problem (1b), calculate its (a) column-sum norm, (b)
row-sum norm and (c) Euclidean (Frobeneus) norm.
expand button
Transcribed Image Text:1) a) Write a Matlab function program thomas(e.f.g.r.n) based on the pseudocode below which solves a tridiagonal system of n linear algebraic equations. Here e, fand g are vectors containing the tridiagonal elements of the coefficient matrix, r is the right hand side vector and x is the solution vector. ₁82 ef 83 C-1 fa-1 B-1-1 er f. J x₂ (a) Decomposition DOFOR K = 2, n ek = ex/fk-1. fk = fk - ek 9k-1 END DO (b) Forward substitution DOFOR K = 2, n rk = rk ek rk-I END DO (c) Back substitution Xn = rn /fn DOFOR k = n -1. 1, -1 Xx=(rk 9k Xx+1)/fk END DO FIGURE 11.2 Pseudocode to implement the Thomas algorithm, an LU decomposition method for tridi- agonal systems. 7₂ 73 b) Write a Matlab main program which calls the function program developed in part (a) to solve the following tridiagonal system 1 3 [x1 5 x₂ = -2 -4 -6 7 c) Solve the tridiagonal system of equations in part (b) manually using the Thomas algorithm in part (a). Show the expression and the numerical value of each variable as it is computed. 2) After scaling the coefficient matrix given in problem (1b), calculate its (a) column-sum norm, (b) row-sum norm and (c) Euclidean (Frobeneus) norm.
Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Recommended textbooks for you
Text book image
Advanced Engineering Mathematics
Advanced Math
ISBN:9780470458365
Author:Erwin Kreyszig
Publisher:Wiley, John & Sons, Incorporated
Text book image
Numerical Methods for Engineers
Advanced Math
ISBN:9780073397924
Author:Steven C. Chapra Dr., Raymond P. Canale
Publisher:McGraw-Hill Education
Text book image
Introductory Mathematics for Engineering Applicat...
Advanced Math
ISBN:9781118141809
Author:Nathan Klingbeil
Publisher:WILEY
Text book image
Mathematics For Machine Technology
Advanced Math
ISBN:9781337798310
Author:Peterson, John.
Publisher:Cengage Learning,
Text book image
Basic Technical Mathematics
Advanced Math
ISBN:9780134437705
Author:Washington
Publisher:PEARSON
Text book image
Topology
Advanced Math
ISBN:9780134689517
Author:Munkres, James R.
Publisher:Pearson,