Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using Matlab. Use program 2.1 to approximate the fixed points (if any) of each function. answer should be accurate to 12 decimal places. Produce a
Using Matlab. Use program 2.1 to approximate the fixed points (if any) of each function. answer should be accurate to 12 decimal places. Produce a table of each function and the line y= x that clearly shows any fixed points.
a) g(x) = cos(sin(x))
Program 2.1 (Fixed-Point Iteration). To approximate a solution to the equation x = g(x) starting with the initial guess Po and iterating pn +1 = g(Pn). function [k,p,err,P]-fixpt (g,po,tol,maxi) % input - g is the iteration function input as a string ,g, - po is the initial guess for the fixed point - tol is the tolerance - max1 is the maximum number of iterations %Output -k is the number of iterations that were carried out - p is the approximation to the fixed point - err is the error in the approximation - P contains the sequence (pn) for k-2:maxi P(k)-feval (g,P(k-1)); err abs (P (k)-P(k-1)); relerr-err/(abs (P (k))+eps); p-P(k); if (err
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