Question: Coding must be done in MATLab 2) (3 pts) Seeing the Golden Ratio work: a(1) Write a function that takes an interval and returns the

Coding must be done in MATLab

2) (3 pts) Seeing the Golden Ratio work:

a(1) Write a function that takes an interval and returns the two points on the x axis used in the next iteration of a golden section search. Remember to include the code in the PDF.

b(2) Write a script that calls the function from 2(a) three times, starting with the interval [4,7] and discarding the right-most segment each iteration (pretend you're doing a golden section search on some f(x) and the minimum appears to be on the left all three times). Again, there is no f(x) or y in this problem. Put all three sets of points in a table in your PDF, and note the number of new function evaluations that would be required at each iteration (the number of new x values in each row).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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

Students Have Also Explored These Related Databases Questions!