HW5 - Call read_matrix(N, A) Call read_vector(N, b) Call...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
COT 3502 Computer Model Formulation Spring 2008 1 Homework # 5 Due Tuesday, March 4 All problems except problem #3 should be done without using VB. 1. (3 points) Prove that the matrix product is associative, i.e. that A ( BC ) = ( AB ) C for any three n × n matrices A , B , and C . 2. (3 points) Solve Problem 9.8 from the textbook. 3. (9 points) Write a VB subroutine Gauss to solve the system of equa- tions A x = b using the “naive” Gaussian elimination, i.e. the Gaussian elimination without pivoting. This subroutine should be completely self- contained, i.e. the user should specify the matrix size N , an N × N matrix A , and an N -dimensional vector b . The subroutine should return an N - dimensional vector x containing the solution. For example, the main program calling this subroutine may look as fol- lows: Sub main() Dim N As Integer Dim A() As Double, b() As Double, x() as Double()
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Call read_matrix(N, A) Call read_vector(N, b) Call Gauss(N,A,b,x) Call write_vector(N, x) End Sub Here, read_matrix , read_vector , and write_vector are the input/output subroutines discussed in class. Test your code for the system of equations from Problem 9.8 of the text-book. 4. (3 points) Solve the following system of equations LU x = 1 1 1 1 1 2 4 4 1 2 1 u v w = 2 2 (1) COT 3502 Computer Model Formulation Spring 2008 2 without multiplying matrices L and U . 5. (3 points) Use the Gauss-Jordan method to invert the following matrix: A = 2-1-1 2-1-1 2 (2)...
View Full Document

This note was uploaded on 02/07/2009 for the course COT 3502 taught by Professor Hawkins during the Spring '08 term at University of Florida.

Page1 / 2

HW5 - Call read_matrix(N, A) Call read_vector(N, b) Call...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online