solving cubic equation by genetic algorithm
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
hello
i want to a cubic equation by genetic algorithm.
is there any code for this equation in genetic algorithm.?
1 Kommentar
Marieta Germanou
am 18 Apr. 2022
This is a multi-objective optimization problem.
You should check this out:
https://www.mathworks.com/help/gads/gamultiobj-plot-vectorize.html
Antworten (2)
Paxorus Sahay
am 26 Jul. 2016
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.
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!