Interval Line Search for Golden Selection

5 visualizaciones (últimos 30 días)
Sarp Ulger
Sarp Ulger el 29 de Oct. de 2015
Comentada: Geoff Hayes el 30 de Oct. de 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 comentarios
Sarp Ulger
Sarp Ulger el 30 de Oct. de 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 el 30 de Oct. de 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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by