ASE311 HW4 pdf - ASE 311 Engineering computation, Fall...

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

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ASE 311 Engineering computation, Fall 2009, Homework 4 Due: Friday, September 25, 2:00 PM in the lecture room JGB 2.216 Report all work, including any m-files you have written. You may also find the command diary useful in recording your MATLAB session. Please write clearly and be sure to label for which problem each solution is. Please, staple Part I and Part II separately and make sure that your name is written on both parts. Part I 1. Three matrices are defined as [ 1 3 [] = , 0 −1 [ 2 2 [] = , 1 0 [ 4 15 [] = 5 9 Compute manually [][] − [][], [][] − [][] and [][] − [][]. Check with MATLAB. 2. [Transpose of a product] Let [] be a × - and [] a × -matrix, respectively. Prove that ([][]) = [] [] Part II 3. Solve the system of equations 2 + 6 + 10 = 0 + 3 + 3 = 2 3 + 14 + 28 = −8 manually using Gauss elimination. 4. Solve the system of equations from the previous exercise using MATLAB and a) Cramer’s rule b) Built-in function inv c) Left division with the backslash operator ∖ 5. Solve the tridiagonal system ⎡ 2 −1 ⎢−1 2 −1 ⎢ ⎢ .. ⎢ . ⎢ ⎣ −1 ⎤⎡ ⎡ ⎤ 1 ⎥⎢ ⎥ ⎢1⎥ ⎥⎢ ⎥ ⎢ ⎥ ⎥⎢ ⎥ ⎢.⎥ ⎥⎢ ⎥ = ⎢.⎥ ⎥⎢ ⎥ ⎢.⎥ ⎦ ⎣−1 ⎦ ⎣1⎦ 2 −1 −1 2 1 1 2 . . . ⎤ using MATLAB and naive Gauss elimination for = 100, 200, 300, 400, 500. Report the value of 1 for each case and measure the CPU time used by your solver routine with the command cputime. Plot the time as a function of . Hint: You can create the coefficient matrix using the command A = -diag(ones(n-1,1),-1)+2*diag(ones(n,1))-diag(ones(n-1,1),1); ...
View Full Document

This note was uploaded on 10/01/2009 for the course ASE 311 taught by Professor Kraczek during the Spring '08 term at University of Texas at Austin.

Ask a homework question - tutors are online