Use MATLAB to solve Example A.2.
From Example A.2, we obtain matrix A and vector B and enter them in MATLAB as follows.
>> A = [25 -5 -20 ; -5 10 -4 ; -5 -4 9]
A =
25 -5 -20
-5 10 -4
-5 -4 9
>> B = [50 0 0]’
B =
50
0
0
>> X = inv(A)*B
X =
29.6000
26.0000
28.0000
>> X = A\B
X =
29.6000
26.0000
28.0000
Thus, x1=29.6,x2=26, and x3=28.