New Word 2007 Document (17)

New Word 2007 Document (17) - than stopping when is smaller...

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

View Full Document Right Arrow Icon
Now think about the iteration. Atkinson's algorithm employs the return to Step 1 device to indicate uncounted repetition of Steps 1-4. Matlab provides a more elegant construct for uncounted repetition: the while loop. In Atkinson's Step 2, the algorithm is terminated. Matlab while loops usually terminate at their end, so we continue iterating for as long as is larger than epsilon, rather
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: than stopping when is smaller. This reversal of the test is sometimes confusing, but it is how it is done. Here is a Matlab function that carries out the bisection algorithm for our cosmx function. The endpoints of the initial interval are variables that you specify when you invoke the function. The Matlab variables xa , xb and xc represent the mathematical quantities , and ....
View Full Document

This document was uploaded on 05/07/2010.

Ask a homework question - tutors are online