This iterative procedure must stop when the absolute difference between x(n) and x(n+1) is less than a given tolerance epsilon. The function must accept as inputs, a scalar function 'f', an initial number 'x' and a positive number 'epsilon' to terminate the procedure. Hence by using this numerical technique I would like to find the root of the equation e^x-x^2=0.
function y=q3(x) f=('Enter a scalar function: '); x=('Enter a number: '); % initial number epsilon=('Enter a positive number: ');
Any help would be greatly appreciated. Thanks in advance.