Question: USE THIS FORMAT to produce this newtons code: newton.m Write a function that implements Newton's method. Its syntax is sol = newton ( f ,
USE THIS FORMAT to produce this newtons code:
newton.m
Write a function that implements Newton's method. Its syntax is
sol newtonffpxtol
where sol is the approximate root, f is an anonymous function, fp is the derivative of f x is the initial guess, and tol is an optional argument for error tolerance. Remember to check for small in absolute value derivatives and display an error or warning if this occurs.
No credit will be given for scripts or for functions that prompt the user for input. The functions must accept arguments in the proper order as part of the function call and return outputs of the correct type. Also, do not show any intermediate calculations in the Command Window. Only the output of the function should appear.
Include headers in each of your mfiles describing the basic purpose of the function, the syntax, its inputs, and its outputs. Use the included bisect.m as a template for what to include and how to format things.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
