% Script File: ShowMySqrt
% Plots the error in the function MySqrt.

close all
L = 1;
R = 300;
N = 1000;
Avals = linspace(L,R,N);
s = zeros(1,N);
for k=1:N
s(k) = MySqrt(Avals(k));
end
error = abs(s-sqrt(Avals))./sqrt(Avals);
figure
plot(Avals,error+eps*.01)
title('Relative Error in the Function MySqrt(A)','fontsize',16)
xlabel('A');