Question: PROBLEM 5.23. points 20 Use MATLAB Develop a user-friendly function for the false-position method. The structure of your function should be similar to the bisection

PROBLEM 5.23. points 20 Use MATLAB Develop a user-friendly function for the false-position method. The structure of your function should be similar to the bisection algorithm outlined in Fig. 5.10 of your textbook. a. Your function should have the following form: I sol where myFalsePosition( f, xl, xu, tol, maxit ) a function handle, to be defined as an anonymous function within the script that calls myFalsePosition, x1, xu are the lower and upper limits that bracket the root. . tol is the error tolerance in %, e maxit is the maximum number of iterations so1 an array or table that stores for every iteration the following information: num ber of Iteration, the approximate root, the value of the function froot at the approximated root, the approximate relative percent error ea. b. Place documentation statements (comments) throughout the function to identify what each section is intended to accomplish. c. Label the input and output. d. Test the function by duplicating the computations from Example 5.5 of textbook. Also, produce error plots versus the number of iterations. PROBLEM 5.23. points 20 Use MATLAB Develop a user-friendly function for the false-position method. The structure of your function should be similar to the bisection algorithm outlined in Fig. 5.10 of your textbook. a. Your function should have the following form: I sol where myFalsePosition( f, xl, xu, tol, maxit ) a function handle, to be defined as an anonymous function within the script that calls myFalsePosition, x1, xu are the lower and upper limits that bracket the root. . tol is the error tolerance in %, e maxit is the maximum number of iterations so1 an array or table that stores for every iteration the following information: num ber of Iteration, the approximate root, the value of the function froot at the approximated root, the approximate relative percent error ea. b. Place documentation statements (comments) throughout the function to identify what each section is intended to accomplish. c. Label the input and output. d. Test the function by duplicating the computations from Example 5.5 of textbook. Also, produce error plots versus the number of iterations
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
