{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lecture 20

# Lecture 20 - Elimination of first column a11 a 21 a31 a41...

This preview shows pages 1–6. Sign up to view the full content.

Elimination of first column ) ( ) ( ) ( ) ( ) ( ) ( 1 f 4 1 f 3 1 f 2 b a a a 0 b a a a 0 b a a a 0 b a a a a 41 31 21 4 44 43 42 3 34 33 32 2 24 23 22 1 14 13 12 11 × - × - × - 11 41 41 11 31 31 11 21 21 4 44 43 42 41 3 34 33 32 31 2 24 23 22 21 1 14 13 12 11 a a f a a f a a f b a a a a b a a a a b a a a a b a a a a / / / = = = Involve (n-1)(n+1)=3 x 5 Multiplications

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

View Full Document
Elimination of second column ) ( ) ( ) ( ) ( / / 2 f 4 2 f 3 b a a 0 0 b a a 0 0 b a a a 0 b a a a a a a f a a f b a a a 0 b a a a 0 b a a a 0 b a a a a 42 32 4 44 43 3 34 33 2 24 23 22 1 14 13 12 11 22 42 42 22 32 32 4 44 43 42 3 34 33 32 2 24 23 22 1 14 13 12 11 × - × - = = Involve (n-2)n=2 x 4 Multiplications
Elimination of third column Upper triangular matrix ) ( ) ( / 3 f 4 b a 0 0 0 b a a 0 0 b a a a 0 b a a a a a a f a a a 0 0 a a a 0 0 b a a a 0 b a a a a 43 4 44 3 34 33 2 24 23 22 1 14 13 12 11 33 43 43 4 44 43 3 34 33 2 24 23 22 1 14 13 12 11 × - =

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

View Full Document
MATLAB Script File: GaussNaive p.222 21 21 11 31 31 11 41 41 11 f / f / f / a a a a a a = = = K=1: Three loops
Print all factor and Aug (do not suppress output) Eliminate first column Eliminate second column Eliminate third column Back-substitution Aug = [A, b] >> format short >> x = GaussNaive(A,b) m = 4 n = 4 Aug = 1 0 2 3 1 -1 2 2 -3 -1 0 1 1 4 2 6 2 2 4 1 factor = -1 Aug = 1 0 2 3 1 0 2 4 0 0 0 1 1 4 2 6 2 2 4 1 factor = 0 Aug = 1 0 2 3 1 0 2 4 0 0 0 1 1 4 2 6 2 2 4 1 factor = 6 Aug = 1 0 2 3 1 0 2 4 0 0 0 1 1 4 2 0 2 -10 -14 -5 factor = 0.5000 Aug = 1 0 2 3 1 0 2 4 0 0 0 0 -1 4 2 0 2 -10 -14 -5 factor = 1 Aug = 1 0 2 3 1 0 2 4 0 0 0 0 -1 4 2 0 0 -14 -14 -5 factor = 14 Aug = 1 0 2 3 1 0 2 4 0 0 0 0 -1 4 2 0 0 0 -70 -33 x 4 x 3 x 2 x 1 x = 0 0 0 0.4714 x = 0 0 -0.1143 0.4714 x = 0 0.2286 -0.1143 0.4714 x = -0.1857 0.2286 -0.1143 0.4714

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}