Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 starting from the given initial estimates and
with a tolerance in function of at least using the secant method. Name the function mysecant using as input
the anonymous function the initial estimates and the maximum number of iterations to perform and
the required tolerance in function epsok. As output, the function shall return four scalar variables: the numerical
solution its tolerance in function tolFunc, its estimated relative error ere, and the number of iterations performed
If the requested tolerance in function cannot be reached within 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
required per iteration, by storing function call results in temporary storage variables. You may use only
function call to to update the solution per iteration.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started