Lecture20-21 - Tridiagonal Matrix Forward elimination ek f...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Tridiagonal Matrix Forward elimination Back substitution n 3 2 k r f e r r g f e f f 1 k 1 k k k k 1 k 1 k k k k , , , = - = - = - - - - 1 2 3 2 n 1 n k f x g r x f r x k 1 k k k k n n n , , , , , - - = - = = + Use factor = e k / f k - 1 to eliminate subdiagonal element Apply the same matrix operations to right hand side
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Hand Calculations: Tridiagonal Matrix - = - - - - - - 5 3 2 5 3 x x x x 25 1 5 0 0 0 5 0 2 1 0 0 1 5 2 0 0 2 1 4 3 2 1 . . . . = - - = - = = - - - = - = = - - - = - = = - - - = - = - = - - - = - = = - - - = - = 4 1 1 5 0 5 3 r f e r r 1 5 0 1 5 0 25 1 g f e f f 1 1 1 1 2 r f e r r 1 1 1 1 2 g f e f f 1 3 1 2 5 r f e r r 1 2 1 2 5 g f e f f 3 3 4 4 4 3 3 4 4 4 1 1 2 2 3 2 2 3 3 3 1 1 2 2 2 1 1 2 2 2 ) ( . . ) . ( . . ) ( ) ( ) ( ) ( 1 1 2 2 3 f x g r x 2 1 3 1 1 f x g r x 3 1 4 5 0 1 f x g r x 4 1 4 f r x 1 2 1 1 1 2 3 2 2 2 3 4 3 3 3 4 4 4 = - - - = - = = - - - = - = = - - = - = = = = ) )( ( ) )( ( ) )( . ( (a) Forward elimination (b) Back substitution
Background image of page 2
MATLAB M-file: Tridiag
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
» [e,f,g,r] = example e = 0 -2.0000 4.0000 -0.5000 1.5000 -3.0000 f = 1.0000 6.0000 9.0000 3.2500 1.7500 13.0000 g = -2.0000 4.0000 -0.5000 1.5000 -3.0000 0 r = -3.0000 22.0000 35.5000 -7.7500 4.0000 -33.0000 » x = Tridiag (e, f, g, r) x = 1 2 3 -1 -2 -3 Example: Tridiagonal matrix function [e,f,g,r] = example e=[ 0 -2 4 -0.5 1.5 -3]; f=[ 1 6 9 3.25 1.75 13]; g=[-2 4 -0.5 1.5 -3 0]; r=[-3 22 35.5 -7.75 4 -33]; 33 4 75 . 7 5 . 35 22 3 x x x x x x 13 3 3 75 . 1 5 . 1 5 . 1 25 . 3 5 . 0 5 . 0 9 4 4 6 2 2 1 6 5 4 3 2 1 - = - = - - - - - - Note: e(1) = 0 and g(n) = 0
Background image of page 4
Chapter 9 LU Decomposition
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
L and U Matrices Lower Triangular Matrix Upper Triangular Matrix [ ] = 44 34 33 24 23 22 13 13 12 11 u 0 0 0 u u 0 0 u u u 0 u u u u U [ ] = 44 34 42 41 33 32 31 22 21 11 l l l l 0 l l l 0 0 l l 0 0 0 l L
Background image of page 6
Another method for solving matrix equations Idea behind the LU Decomposition - start with We know (because we did it in Gauss Elimination) we can write [ ] { } { } = = 4 3 2 1 4 3 2 1 44 34 33 24 23 22 14 13 12 11 d d d d x x x x u u u u u u u u u u d x U LU Decomposition [ ] { } { } x A b =
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
LU Decomposition Assume there exists [ L ] Such that This implies [ ] [ ] { } { } ( 29 [ ] { } { } b x A d x U L - = - [ ] [ ] [ ] [ ] { } { } b d L A U L = = [ ] = 44 34 42 41 33 32 31 22 21 11 l l l l l l l l l l L
Background image of page 8
Decomposition
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/05/2011 for the course EGM 3344 taught by Professor Raphaelhaftka during the Spring '09 term at University of Florida.

Page1 / 49

Lecture20-21 - Tridiagonal Matrix Forward elimination ek f...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online