필터 지우기
필터 지우기

How do I minimize a function

조회 수: 1 (최근 30일)
akhila k
akhila k 2018년 5월 23일
댓글: Ameer Hamza 2018년 5월 23일
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.

채택된 답변

Majid Farzaneh
Majid Farzaneh 2018년 5월 23일
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
Ameer Hamza
Ameer Hamza 2018년 5월 23일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Genetic Algorithm에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by