Question: Develop an M-file that is expressly designed to locate a maximum with the golden-section search algorithm. In other words, set it up so that it

Develop an M-file that is expressly designed to locate a maximum with the golden-section search algorithm. In other words, set it up so that it directly finds the maximum rather than finding the minimum of -f(x). Test your program with the same problem as Example 13.1. The function should have the following features:
• 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

3.55 Rating (165 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Function x fx ea iter gold maxf xl xu es maxit varargin gold max maximization golden section search ... 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(870).docx

120 KBs Word File

Students Have Also Explored These Related Numerical Analysis Questions!