Question: Develop an M-file to implement parabolic interpolation to locate a minimum. Test your program with the same problem as Example 13.2. The function should have

Develop an M-file to implement parabolic interpolation to locate a minimum. Test your program with the same problem as Example 13.2. 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).
• Use a bracketing approach (as in Example 13.2) to replace old values with new values?

Step by Step Solution

3.38 Rating (164 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Function xopt fopt prob 1516 func xlow xhigh es maxit varargin prob1516 minim... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Document Format (1 attachment)

Word file Icon

1228-M-N-A-O(872).docx

120 KBs Word File

Students Have Also Explored These Related Numerical Analysis Questions!