Find minimum of double-variable function on fixed interval
Ältere Kommentare anzeigen
Hi every body I have this function : y=(G*r)/4 + ((G^2*r^2)/16 + (G*r)/4 - 1/4)^(1/2) + 1/2 and I would calculated the minimum of this, in 0:1 interval for both of variable.
How I can write their code?
regards
Akzeptierte Antwort
Weitere Antworten (1)
Titus Edelhofer
am 15 Jun. 2015
0 Stimmen
Hi,
just to be sure: your y is dependent both on G and r and you want to minimize on the square [0..1]x[0..1]?
In this case fmincon from optimization toolbox is your friend, although your function is not real-valued in the entire square. E.g. for G=0.5, r=0.5 the result is complex ...?
Titus
3 Kommentare
Mohammad
am 15 Jun. 2015
Walter Roberson
am 15 Jun. 2015
the abs() of the function is 1/sqrt(2) for most of the area, and increases in a region near 0.81 to 1 in G and r. The minimum is therefor going to be 1/sqrt(2)
Mohammad
am 15 Jun. 2015
Kategorien
Mehr zu Direct Search finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!