Question: Writeafunctionwithheader [ X ] = myFixedPoint ( f , g , tol,maxIter ) , wherefand gare function handles and tol and maxIterarestrictly positive scalars. The
WriteafunctionwithheaderX myFixedPointfgtol,maxIterwherefand
gare function handles and tol and maxIterarestrictly positive scalars. The input argument,
maxIter, is also an integer. The output argument, X should be a scalar satisfying f X
gX tol; that is X is a point that almost satisfies fX gX To find X you should
use the Bisection method with error metric, Fm tol. The function myFixedPoint
should give up after maxIter number of iterations and return X if this occurs.
Test Cases:
f @x x;
RE myBisectionfe
R
E
f @xsinxcosx;
RE myBisectionfe
R
E
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
