2. Algorithm implementation: Write a MATLAB program to compute the square root using the following algorithm: y(n) = x(n) - y^2(n - 1) + y(n - 1). Show that the output y(n) of this system for an input x(n) = alpha u(n) with y(-1) = 1 converges to as n Solution %MATLAB PROGRAM FOR CHEGG %y(n)=x(n)-y^2(n-1) + y(n-1) %Here n is the input to the function %Assyming x(n) = n %y(n) is the square root of n function result=f(n) if(n>=0) result=n-(f(n-1))^2 +f(n-1); end end %Error function for n=1:10000 error=f(n)-sqrt(n); end.