Interval Line Search for Golden Selection
Show older comments
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
on 29 Oct 2015
Sarp Ulger
on 30 Oct 2015
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.
Answers (0)
Categories
Find more on Logical 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!