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 

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

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 Programming Questions!