(MATLAB) Let A be a tridiagonal matrix, i.e a matrix that looks like this [d₁ e₁ C₁ d₂ e₂ C2 d3 €3 A = Cn-2 dn-1 en-1 Cn
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
(MATLAB) Let A be a tridiagonal matrix, i.e a matrix that looks like this [d₁ e₁ C₁ d₂ e₂ C2 d3 €3 A = Cn-2 dn-1 en-1 Cn
(MATLAB) Let A be a tridiagonal matrix, i.e a matrix that looks like this [d₁ e₁ C₁ d₂ e₂ C2 d3 €3 A = Cn-2 dn-1 en-1 Cn-1 dn LU factorization without pivoting gives two diagonal matrices u₁ el 41 12 €2 1 N L= = In-2 1 Un-1 C-1 Un Calculation of U and comparison with matrix A gives Därför means therefore lkuk = ck därför lk = Ck/uk, lkek+uk+1=dk+1 därför uk+1= = dk+1-lkek, Which also gives u1 = d1. Create a function file that solves a tridiagonal system Ax=b using LU factorization without pivoting, forward substitution and backward substitution and that does not perform unnecessary operations (calculates with 0). This MATLAB function receives four vectors: e, d, c (representing A) and b and returns the solution x and matrices Land U from LU- factorization. Note that • A=diag(c, -1)+diag(d)+diag(e, 1) • L=eye(n)+diag(1, -1) there n is the size of the system • U=diag(u)+diag(e) uz e3
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!