Page 248 -
P. 248
Gaussian elimination technique (and its different refinements) is essentially
the numerical method of choice for the built-in algorithms of numerical soft-
wares, including MATLAB. The following two examples are essential build-
ing blocks in such constructions.
Example 8.4
Without using the MATLAB inverse command, solve the system of equations:
LX = B (8.12)
where L is a lower triangular matrix.
Solution: In matrix form, the system of equations to be solved is
L 0 0 L 0 x b
1
11 1
L 21 L 22 0 L 0 x 2 b 2
M M M O M M = (8.13)
M
M
M M M L M M
L n1 L n2 L n3 L L x b
n
n
nn
The solution of this system can be directly obtained if we proceed iteratively.
That is, we find in the following order: x , x , …, x , obtaining:
1
n
2
b
x = 1
1
L
11
x = ( b − L x )
21 1
2
2
L
22
(8.14)
M
k 1
−
k ∑
b − L x
kj j
=
x = j 1
k
L
kk
The above solution can be implemented by executing the following script
M-file:
L=[ ]; % enter the L matrix
b=[ ]; % enter the B column
n=length(b);
x=zeros(n,1);
© 2001 by CRC Press LLC