Develop an M-file that is expressly designed to locate a maximum with the golden-section
Chapter 7, Problem 7.15(choose chapter or problem)
Develop an M-file that is expressly designed to locate a maximum with the golden-section search. In other words, set if up so that it directly finds the maximum rather than finding the minimum of f(x). 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). Test your program with the same problem as Example 7.1.
Unfortunately, we don't have that question answered yet. But you can get it answered in just 5 hours by Logging in or Becoming a subscriber.
Becoming a subscriber
Or look for another answer