Problem 3 (40 points) (CCOs 1 & 3)/MatlabGrader 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 g (x). Copy the file into your working directory and use it as any other Matlab .m file or build-in intrinsic Matlab function (just call it using its name process). 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 g(x) in the interval 0 ≤ x ≤ 10 to a tolerance in function of at least 10-10 using mySecant from problem 2. Recall that any .m or .p function file can be passed as an argument into another function by prefacing the function name by a @, e.g., @process can be passed as an argument into any Matlab function that uses a function as an input argument, for example fplot(@process,...) for plotting a function. 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. Do not print out any results to screen in the script you submit to MatlabGrader! MatlabGrader will print your results to the output window. Confirm that these values reported by MatlabGrader are the same as the ones you find in your own Matlab (where you add print statements to print results to screen). After the submission grace period, you will be graded only based on the values reported by MatlabGrader. Note: The MatlabGrader submission will not tell you if your answers are correct and the shown score does not reflect your final problem score. In fact the assessment test will always fail since that is the only way to show you the results MatlabGrader will use to grade your submission after the deadline. Required submission: ☐ well commented script source code submitted to Matlab Grader using the Canvas link for Exam 3 - Problem 3

Elements Of Electromagnetics
7th Edition
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Sadiku, Matthew N. O.
ChapterMA: Math Assessment
Section: Chapter Questions
Problem 1.1MA
icon
Related questions
Question
Problem 3 (40 points) (CCOs 1 & 3)/MatlabGrader
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 g (x). Copy the file into your working directory and use it as any other Matlab .m file or build-in intrinsic
Matlab function (just call it using its name process). 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 g(x) in the interval 0 ≤ x ≤ 10 to a tolerance in function of at least 10-10 using mySecant from problem 2.
Recall that any .m or .p function file can be passed as an argument into another function by prefacing the function name by a
@, e.g., @process can be passed as an argument into any Matlab function that uses a function as an input argument, for example
fplot(@process,...) for plotting a function.
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.
Do not print out any results to screen in the script you submit to MatlabGrader! MatlabGrader will print your results to the output
window. Confirm that these values reported by MatlabGrader are the same as the ones you find in your own Matlab (where you add
print statements to print results to screen). After the submission grace period, you will be graded only based on the values reported
by MatlabGrader.
Note: The MatlabGrader submission will not tell you if your answers are correct and the shown score does not reflect your final
problem score. In fact the assessment test will always fail since that is the only way to show you the results MatlabGrader will use
to grade your submission after the deadline.
Required submission:
☐ well commented script source code submitted to Matlab Grader using the Canvas link for Exam 3 - Problem 3
Transcribed Image Text:Problem 3 (40 points) (CCOs 1 & 3)/MatlabGrader 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 g (x). Copy the file into your working directory and use it as any other Matlab .m file or build-in intrinsic Matlab function (just call it using its name process). 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 g(x) in the interval 0 ≤ x ≤ 10 to a tolerance in function of at least 10-10 using mySecant from problem 2. Recall that any .m or .p function file can be passed as an argument into another function by prefacing the function name by a @, e.g., @process can be passed as an argument into any Matlab function that uses a function as an input argument, for example fplot(@process,...) for plotting a function. 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. Do not print out any results to screen in the script you submit to MatlabGrader! MatlabGrader will print your results to the output window. Confirm that these values reported by MatlabGrader are the same as the ones you find in your own Matlab (where you add print statements to print results to screen). After the submission grace period, you will be graded only based on the values reported by MatlabGrader. Note: The MatlabGrader submission will not tell you if your answers are correct and the shown score does not reflect your final problem score. In fact the assessment test will always fail since that is the only way to show you the results MatlabGrader will use to grade your submission after the deadline. Required submission: ☐ well commented script source code submitted to Matlab Grader using the Canvas link for Exam 3 - Problem 3
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Elements Of Electromagnetics
Elements Of Electromagnetics
Mechanical Engineering
ISBN:
9780190698614
Author:
Sadiku, Matthew N. O.
Publisher:
Oxford University Press
Mechanics of Materials (10th Edition)
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:
9780134319650
Author:
Russell C. Hibbeler
Publisher:
PEARSON
Thermodynamics: An Engineering Approach
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:
9781259822674
Author:
Yunus A. Cengel Dr., Michael A. Boles
Publisher:
McGraw-Hill Education
Control Systems Engineering
Control Systems Engineering
Mechanical Engineering
ISBN:
9781118170519
Author:
Norman S. Nise
Publisher:
WILEY
Mechanics of Materials (MindTap Course List)
Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:
9781337093347
Author:
Barry J. Goodno, James M. Gere
Publisher:
Cengage Learning
Engineering Mechanics: Statics
Engineering Mechanics: Statics
Mechanical Engineering
ISBN:
9781118807330
Author:
James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:
WILEY