Question: please complete the matlab code Newton-Raphson Pseudo-code 1. Start 2. Define function as f(x) 3. Define first derivative of f(x) as f (x) 4. Input
please complete the matlab code Newton-Raphson Pseudo-code 1. Start 2. Define function as f(x) 3. Define first derivative of f(x) as f (x) 4. Input initial guess (x0), tolerable error (s) and maximum iteration (n) 5. Initialize iteration counter i = 1 6. If f (x0) = 0 then print "Mathematical Error" and go to (12) otherwise go to (7) 7. Calculate x1 = x0 - f(x0) / f (x0) 8. Increment iteration counter i = i + 1 9. If i >= n then print "Not Convergent" and go to (12) otherwise go to (10) 10. If |f(x1)| > s then set x0 = x1 and go to (6) otherwise go to (11) 11. Print root as x1 12. Stop
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
