How do I minimize a function
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
akhila k
am 23 Mai 2018
Kommentiert: Ameer Hamza
am 23 Mai 2018
I got an 8th degree equation for a curve through curve fitting toolbox and I have to Minimize it. So how would I understand what parameters are chosen or what kind of function to choose for a particular equation.
0 Kommentare
Akzeptierte Antwort
Majid Farzaneh
am 23 Mai 2018
Hi, You can use genetic algorithm (ga) like this:
[x, Fval]=ga(@(x) your_fcn(x), N)
N is number of variables in your function. The output contains x (your optimum values for your variables) and Fval (minimum value provided by optimum x). If you have constrains try
help ga
Also you can use fmincon. Try
help fmincon
1 Kommentar
Ameer Hamza
am 23 Mai 2018
I would suggest using fmincon. Since the estimated function is an analytical so fmincon will be able to quickly and more accurately estimate the minima.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Genetic Algorithm finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!