Question: Write a user - defined function in MatLab named RegulaFalsiRootMod 1 that solves the nonlinear equation f ( x ) = 0 with modified Regula
Write a userdefined function in MatLab named RegulaFalsiRootMod that solves the nonlinear equation with modified Regula Falsi method see Fig The function should check if the endpoints stay the same. If an endpoint stays the same for three iterations, the value of the function at that point should be divided by If the value of the point stays the same for three more iterations the value of the function at that point should be divided again by the true value is now divided by and so on The function should have as input arguments, the function function handle two values that bracket the root and the error. The function should stop when the Estimated
Relative Error becomes smaller or equal to the error inserted as an input argument If the input arguments are less than the function should automatically define the error equal to The maximum number of iterations should be imax and when it has been reached the program should print a message that states that the solution has not been derived in imax iterations should be shown.
Use the function RegulaFalsiRootMod you wrote, to find the smallest positive root of the polynomial with the initial two values to be and Compare the result you obtained by using MatLab buildin functions zero and roots. Use format long to compare as many figures as possible.
For the RegulaFalsiRootModl function you are allowed to use the following buildin functions of MatLab: feval, nargin, error, rem, abs fprintf. Submit a MatLab files with explanations and report with comparisons and explanations.
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
