This is a code I have created to calculate numerically the 5th root. Something is wrong.
x = 0.05;x_old = 500;iter = 0;while abs(x_old-x) > 10^-3 && x ~= 0 x_old = x; x = x - (5*x*x*x*x); iter = iter + 1;end
mathematicsMATLAB
x = 0.05;x_old = 500;iter = 0;while abs(x_old-x) > 10^-3 && x ~= 0 x_old = x; x = x - (5*x*x*x*x); iter = iter + 1;end
Best Answer