The following Matlab code is being used to calculate 71/5   by fixed-point iterations.

Find and correct 3 mistakes in that code.

 

g = 'p-(p^5-7)/12'

format long

exact = 7^.2;

p = 1;

error = abs(exact - p);

k = 0;

disp('  k         p            error')

while k<50 & error<1e2 & error>1e-2

     p = g(p);

     error = abs(exact - p);

end

print('%3d   %12.9f   %12.6e', k,p,error)