ME581_Assignment02

ME581_Assignment02 - ME 581 Assignment #2 In the following...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
ME 581 Assignment #2 In the following questions show the derivations that you used to write your program. 1. Write an LU factorization subroutine with partial pivoting to decompose a matrix into a product of a lower triangular matrix and an upper triangular matrix. The input to your subroutine should be matrix [ A ] and the number of rows/columns of [ A ]. The output to the subroutine should be the lower triangular matrix, the upper triangular matrix and the permutation matrix. Test your program using the following matrix. = 3 2 1 2 5 1 2 1 4 1 1 1 5 1 1 1 4 6 2 1 2 4 2 4 2 ] [ A 2. Use the LU factorization routine that you developed in Question 1 in a subroutine to solve a system of linear equations of the form [ A ]{ x } = { c } for vector { x }. The input to your program should be matrix [ A ], vector { c } and number of columns/row of the square matrix [ A ]. The output of your program should be vector
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.
Ask a homework question - tutors are online