Develop an M-file to implement parabolic interpolation to locate a minimum. Test your program with the same
Question:
• 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).
• Use a bracketing approach (as in Example 13.2) to replace old values with new values?
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Numerical Methods for Engineers
ISBN: 978-9352602131
7th edition
Authors: Steven C. Chapra, Raymond P. Canale
Question Posted: