Differential Equations Solutions 8

Differential Equations Solutions 8 - sults are shown in...

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

View Full Document Right Arrow Icon
18 Chapter 4. Solutions: Design of Computer Programs 50 100 150 200 10 -2 10 -1 10 0 10 1 10 2 10 3 number of columns time (sec) Times for matrices with 200 rows Original algorithm Modified algorithm Figure 4.1. Time taken by the two algorithms for matrices with 200 rows. CHALLENGE 4.3. (a) This program computes a QR decomposition of the matrix C using the modiFed Gram-Schmidt algorithm. (b) See website. (c) This is corrected in postedfact.m on the website. The columns of q should be mutually orthogonal, but the number of columns in q should be the minimum of the row and column dimensions of C . Nonzero columns after that are just the result of rounding errors. CHALLENGE 4.4. The resulting program is on the website, and the timing re-
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: sults are shown in igure 4.1. The program posted has been modiFed in postedfac to use vector operations, use internal functions like norm when possible, and pre-allocate storage for Q and R . The postedfact function runs 150-200 times faster than posted on matrices with 200 rows, using a Sun UltraSPARC-III with clock speed 750 MHz running MATLAB 6. It is an interesting exercise to determine the relative importance of the three changes. You also might think about how an ecient implementation in your favorite programming language might dier from this one....
View Full Document

This note was uploaded on 01/21/2012 for the course MAP 3302 taught by Professor Dr.robin during the Fall '11 term at University of Florida.

Ask a homework question - tutors are online