Question: create a mathlab code Ch. 6 Create the Secant Method O solutions submitted (max: Unlimited) Modify the given newtraph function to instead use the secant
Ch. 6 Create the Secant Method O solutions submitted (max: Unlimited) Modify the given newtraph function to instead use the secant method. As a test, you can use the new function on the previous problem and see that it gives you the same solution Function Roset MATLAB Document 1 function (root, ea, iter) secant(func, x0, x1,es) xr,es,maxit, varargin) s, maxit,p1, p2, ...): function (root, ea, iter=newtraph(func,dfunc, xr,esma $newtraph: Newton-Raphson root location zeroes froot ea, iter) = newtraph(func, dfunc, xr,es, maxit,pl. uses Newton-Raphson method to find the root of input: * func = name of function % dfunc = name of derivative of function $ x = initial guess % es = desired relative error (default = 0.0001%) maxit = maximum allowable iterations (default = 50) pl.p2.... = additional parameters used by function % output: root = real root $ ea = approximate relative error (%) % iter = number of iterations if nargin= maxit, break, end end root = xr
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
