Question: Write a MATLAB function that computes the Absolute Relative Error(ARE) between two functions. The functions, for which the error is being computed, are to be
Write a MATLAB function that computes the Absolute Relative Error(ARE) between two functions. The functions, for which the error is being computed, are to be passed into the function you are creating. A template of for the function call is included here.
function [Error,x,y1,y2] = AbsRelativeError( NumberOfPoints, ...StartingValue, StoppingValue, ...Function1, Function2 )
Then use this function to compute the error in the approximation of sin(x)=x for|x| < pi/4. Your program should compute sin(x) and the ARE of sin(x) .vs. x, for about 500 points between -pi/4 to pi/4.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
