{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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 efficient implementation in your favorite programming language might di²er from this one....
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online