{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

New Word 2007 Document (14)

New Word 2007 Document (14) - practical one we will be...

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

View Full Document Right Arrow Icon
Programming Bisection Before we look at a sample bisection program, let's discuss some things. If you haven't done much programming before, this is a good time to try to understand the logic behind how we choose variables to set up, what names to give them, and how to control the logic. First of all, we should write the bisection algorithm as a Matlab function . There are two reasons for writing it as a function instead of a script m-file (without the function header) or by typing everything at the command line. The first reason is a
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: practical one: we will be executing the algorithm several times, with differing end points, and functions allow us to use temporary variables without worrying about whether or not they have already been used before. The second reason is pedantic: you should learn how to do this now because it is an important tool in your toolbox. Atkinson describes the bisection algorithm (Section 2.1) in the following manner. (The variable names have changed slightly.)...
View Full Document

{[ snackBarMessage ]}