Worksheet for 3/26/2003 1. Termination conditions: I will provide an example of a function, and will proceed to find its root in an iterative fashion. Your job: tell me when I should stop. Criterion: fractional change in estimate is less than 1% iteration estimate fractional change ----------------------------------------------------- | | | | | | | | | | | | | | | | | | | | | | | | ----------------------------------------------------- 2. Practice using functions as arguments. Write a function called "calculate", which should be placed in a source code file called "calculate.m". This should take two input arguments: a) the name of a function, written as a "string"; that means surrounded by apostrophes, like this: 'sqrt' or 'sin' b) a number Your program should evaluate the function on the given number, and return the result as its output argument. Thus, if I type calculate('sqrt', 25) I should get back ans = 5