Question: Develop an M-file to implement parabolic interpolation to locate a minimum. the function should have the following features: Base it on two initial guesses, and
Develop an M-file to implement parabolic interpolation to locate a minimum. the function should have the following features: Base it on two initial guesses, and have the program generate the third initial value at the midpoint of the interval. Check whether the guesses bracket a maximum. If not, the function should not implement the algorithm, but should return an error message. Iterate until the relative error falls below a stopping criterion or exceeds a maximum number of iterations. Return both the optimal x and f(x)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
