ECOR 2606 Assignment #3 1/. Write a function m-file (falsePos.m) that implements a false position search. Use bisect.m (available in the sample Matlab code folder) as a starting point and maintain the same general structure (i.e. same arguments, same display format, and so on). All you have done to do is change the formula used and (the interesting part) switch from using "maximum error" to "approximate error" (see the lecture 6 slides if don't know what this is). Note that on the first iteration the approximate error is undefined. Nothing should be displayed in the error column (and iteration should not stop). The function f ( x ) = e-x- x has a root between 0 and 1. Execute the first three iterations of a bisection search and the first three iterations of a false position search by hand. In both cases use 0 and 1 as your initial limits. Check your results against those produced by bisect.m and your falsePos.m. Your hand calculations are not to be submitted. Your reward for doing this aspect
This is the end of the preview. Sign up
access the rest of the document.