Interval Line Search for Golden Selection

8 views (last 30 days)
Sarp Ulger
Sarp Ulger on 29 Oct 2015
Commented: Geoff Hayes on 30 Oct 2015
I know the algorithm but I don't know matlab enough, even to code this simple thing. So what I want to do is:
Let there be a function F and a start point xstart. I need to find an interval which includes the minimum of F by doing a line search. For the upper limit the algorithm is as follows:
let x(k+1)=x(k)+2^k
If F(x(k+1))>=F(x(k)), stop x(k+1)=b
else, repeat.
this also applies for the lower limit, the only changes are that you're not adding 2^k, you're subtracting it and that the inequality sign is different.
Can anyone help me out please, I know it's extremely simple but I've been stuck on this thing for 2 days now. The ultimate goal is to write a program to do Golden Selection method and minimize a function.
  3 Comments
Sarp Ulger
Sarp Ulger on 30 Oct 2015
Ok, it started working, I have no idea why it didn't work the first time. I'll just leave this here just in case someone somewhere needs it.
Geoff Hayes
Geoff Hayes on 30 Oct 2015
Sarp - what are the two functions that you are trying to minimize? Does the interval [a,b] make sense given where you think that the minimum should be? A cursory check of your algorithm seems correct but without knowing the functions that you are trying to minimize (or their inputs especially with respect to units) makes it difficult to know exactly what is wrong.

Sign in to comment.

Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!