Pre-Engineering 220 Introduction to MatLab ® & Scientific Programming j kiefer



Download 8.69 Mb.
Page45/128
Date02.05.2018
Size8.69 Mb.
#47255
1   ...   41   42   43   44   45   46   47   48   ...   128
iii) multiply eqn. 2 by and add to eqn. 3; replace eqn. 3.





We have eliminated x1 and x2 from eqn.3 and x1 from eqn. 2.


back substitution iv) solve eqn. 3 for x3, substitute in eqn. 2 & 1.

solve eqn. 2 for x2, substitute in eqn. 1.



solve eqn. 1 for x1.
b. Pivoting

Due to the finite number of digits carried along by the machine, we have to worry about the relative magnitudes of the matrix elements, especially the diagonal elements. In other words, the inverse matrix, may be effectively singular even if not actually so. To minimize this possibility, we commonly rearrange the set of equations to place the largest coefficients on the diagonal, to the extent possible. This process is called pivoting.

e.g.


37x2 – 3x3 = 4

19x1 – 2x2 + 48x3 = 99

7x1 + 0.6x2 +15x3 = -9

rearrange

19x1 – 2x2 + 48x3 = 99

37x2 – 3x3 = 4

7x1 + 0.6x2 +15x3 = -9

or

7x1 + 0.6x2 +15x3 = -9



37x2 – 3x3 = 4

19x1 – 2x2 + 48x3 = 99





Download 8.69 Mb.

Share with your friends:
1   ...   41   42   43   44   45   46   47   48   ...   128




The database is protected by copyright ©ininet.org 2024
send message

    Main page