Question: Code in Matlab It's been about half a year since I've touched Matlab and don't know where to begin for this! For this chapter, you

Code in Matlab
It's been about half a year since I've touched Matlab and don't know where to begin for this!
 Code in MatlabIt's been about half a year since I've touched

For this chapter, you will write adaptable scripts for the bisection method, fixed-point method, Newton's method, and the secant method and do some tests to evaluate their performance. Begin by writing a function named my_fun, which returns f(x) for a given input x and one named my_fun_deriv, which returns the derivative of f(x) at x. Then write functions called Bisection, Fixed_Point, Newton and Secant, which call these functions to compute the zeros of f and output the sequence of pn s used by the method. Consider the equations: f1(x)=21sin((x1)2) and f2(x)=5x2. Plot each of these functions to get an idea of where the smallest positive fixed points lie. Then, for each method listed above, compute the first 15 iterations of each root-finding algorithm and create a table of the absolute errors. You must determine appropriate starting points and report them. Then plot these errors for each method on a single graph with the x-axis as iterations and the y-axis as the error for each f. Repeat this for a log-log plot. You may need to adjust the scales and/or use multiple plots on different scales to illustrate the results properly. Attach the code for my_fun, my_fun_deriv, Bisection, Fixed_Point, Newton and Secant at the end of your report

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!