필터 지우기
필터 지우기

solving cubic equation by genetic algorithm

조회 수: 1 (최근 30일)
sina
sina 2016년 7월 26일
댓글: Marieta Germanou 2022년 4월 18일
hello
i want to a cubic equation by genetic algorithm.
is there any code for this equation in genetic algorithm.?
  댓글 수: 1
Marieta Germanou
Marieta Germanou 2022년 4월 18일
This is a multi-objective optimization problem.
You should check this out:
https://www.mathworks.com/help/gads/gamultiobj-plot-vectorize.html

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

답변 (2개)

Paxorus Sahay
Paxorus Sahay 2016년 7월 26일
The Global Optimization Toolbox might be what you're looking for. If you weren't interested in applying any constraints, your code might look like:
fitnessfcn = @(x)(polyval([1, 6, 8], x)) % quadratic fitness function
[x, fval] = ga(fitnessfcn, 1) % evolves to a local minimum
x is a locally minimizing input to fitnessfcn, and fval is the associated output. Since you're dealing with a function with -Inf as the global minimum, you may want to apply constraints. See http://www.mathworks.com/help/gads/ga.html for the full reference.
  댓글 수: 1
sina
sina 2016년 7월 27일
thanks for your answer.
My equation is : 2x^3+3x^2+3x+1=0
i wanna finding the roots of the above equation .
can find them with your code?

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


sina
sina 2016년 7월 27일
thanks for your answer.
My equation is : 2x^3+3x^2+3x+1=0
i wanna finding the roots of the above equation .
can find them with your code?

카테고리

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