Hi I've been coding Newton's method for college and I've been able to establish a so called table to represent each iteration step.
But when I do fprintf (I have to use fprintf) the title keeps coming up every time before each step rather than just once at the top.
Please could somebody help me, I'm not sure what I'm doing wrong.
% fprintf('k x(k) |f(x(k))| |x(k+1)-x(k)|\n');
fprintf('%d %.9f %.9f %.9f\n',iter,x,abs(f(x)),abs(xk-x))
That is what keeps coming up
Thanks
Best Answer