Please solve the following equation using MATLAB , i\'m having a hard time under
ID: 3708330 • Letter: P
Question
Please solve the following equation using MATLAB , i'm having a hard time undersanding it.(Please Paste the codes bellow all steps)
Explanation / Answer
y0 = 0.2; %Value of y[-1]
A=49; % Value of whose square root needs to be computed
n=0;
while abs(sqrt(x)-y0) > 0 %checking whether convergence has reached
y1=(y0 + x/y0)/2;
y0=y1;
n=n+1; %incrementing the iteration number
end
X = ['number of iterations to converge = ',num2str(n)];
disp(X);
Y = ['Square root of ',num2str(x),' = ',num2str(y0)];
disp(Y);