Question: Develop a well - documented and structured MatLab code which allows solving for the roots of non - linear equations using both Secant Method and
Develop a welldocumented and structured MatLab code which allows solving for the roots of nonlinear
equations using both Secant Method and NewtonRaphson algorithm. Pick a problem of your choice to test
the algorithm, and ensure the problem chosen allows you to demonstrate the following:
Handles when a division by zero is present in the derivative and detects when the solution is
diverging. Provides warnings to the user in the command window.
Allows the user to set the threshold for acceptable error as a percentage between and
Automatically generates a plot to graphically show the progression towards the root on each
iteration.
Enables a relaxation parameter to be set by the user and is implemented in the iterative solution
approach.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
