Question: Develop a Matlab function that finds a root of a function g ( x ) starting from the given initial estimates x ( - 1

Develop a Matlab function that finds a root of a function g(x) starting from the given initial estimates x(-1) and x(0)
with a tolerance in function of at least lonOK using the secant method. Name the function mysecant using as input
the anonymous function g, the initial estimates x00 and x0, the maximum number of iterations to perform N, and
the required tolerance in function epsok. As output, the function shall return four scalar variables: the numerical
solution x, its tolerance in function tolFunc, its estimated relative error ere, and the number of iterations performed
n. If the requested tolerance in function cannot be reached within N iterations, the function shall execute Matlab's
error ("..") function with an appropriate error message. Other than this potential error message, do not print
out any results to screen or do any plotting within the function. You must minimize the number of function calls
g(x) required per iteration, by storing function call results in temporary storage variables. You may use only 1
function call to g to update the solution per iteration.
 Develop a Matlab function that finds a root of a function

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!