Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Implement themodified zeroinalgorithm inA modified Brents method for finding zeros offunctions, by G. Wilkins and M. Gu, inNumerische Mathematik, vol. 123, 2013.You should turn in a .m...

1 answer below »
Implement themodified zeroinalgorithm inA modified Brents method for finding zeros offunctions, by G. Wilkins and M. Gu, inNumerische Mathematik, vol. 123, 2013.You should turn in a .m filemodifiedbrentxxx.mwhich contains a matlab function of theformfunction[root,info] = modifiedbrentxxx(@func,Int,params)where xxx is your student id. On input,funcis a function handle,Intis the initial intervalcontaining a root, andparamsis an object that contains at least three fieldsparams.roottol,params.functolandparams.maxit. Your algorithm should terminate once the interval contain-ing the root is at mostparams.roottolin length, or the function value at the current iterateis at mostparams.functolin absolute value. On output,rootis the computed root, andinfoshould have at least one fieldinfo.flag, which is 0 for a successful execution, and 1 otherwise.Your programcan notuse the matlab built-in functionfzero. It will be tested against a fewfunctions of our choice, against the following criteria: XXXXXXXXXXpoints) A zero is found within given tolerances for each function tested XXXXXXXXXXpoints) All zeroes are found within the right number of function calls.Your program will receive 0 points if the stringfzero, case in-sensitive, shows up anywhere inyour .m file.Submit your .m file to your GSI by 1:00AM, Nov. 7, 2019.
Answered Same Day Oct 09, 2021

Solution

Kshitij answered on Oct 12 2021
136 Votes
modified
entxxx-bvgk2pcu.m
function [root info] = modified
entxxx(func, int, params)
info=0;
N = params.maxit;
tol=params.root_tol;
x = zeros(1, N+1); % Pre-allocate
x1=int.x1;
x2=int.x2;
for n = 2:N,
if x1 == x2
oot = 'f';
eturn
end
x(1) = x1; x(2) = x2;
x(n+1) =...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here