Answered step by step
Verified Expert Solution
Question
1 Approved Answer
On Canvas, you will find a Matlab function file process.p that takes as input the variable x and returns as output the result of a
On Canvas, you will find a Matlab function file process.p that takes as input the variable x and returns as output the result of a complicated process gx Copy the file into your working directory and use it as any other Matlab m file. The only difference between a p and a m file is that the source code of the p file is not visible.
Find all roots of gx in the interval x to a tolerance in function of at least using mySecant from problem Recall that any m or p function file can be passed as an argument into another function by prefacing the function name by a @ eg @process.
Store all found unique roots in a column vector root, the corresponding tolerances in function in a column vector tf and the corresponding estimated relative errors in a column vector ere. The length of these vectors must be the number of unique roots you found.
Printout the values of all roots stored in root, their tolerances in function stored in tf and estimated relative errors ere as well as the number of iterations needed to find each root not stored Confirm that these values reported by MatlabGrader are the same as the ones you find in your own Matlab.
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