Question: Write a function M-File that takes as inputs the value of x and the desired error, and on return gives the value of the
Write a function M-File that takes as inputs the value of x and the desired error, and on return gives the value of the root and the actual absolute percent relative error. I will test your program by typing in the following commands into the MATLAB window: = = >> [root, rel_err] >> [root, rel_err] = my square root ( 2, >> [root, rel_err] = my square >> [root, rel_err] my_ square root ( 2, 10^-1 ) 10^-5 ) root ( 2, 10^-12) my square root (-2, 10^-5 )
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
