Matlab Optimisation toolbox (Score Constaint)
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
BioZ
am 24 Nov. 2021
Beantwortet: Alan Weiss
am 25 Nov. 2021
Greeting all,
I have a long matlab code, but essentially what I have is a TARGETVALUE and ACTUALVALUE variables, I am trying to optimise the the function so that the difference between those is 0. However, my optimiser keeps omptimising the problem to the point where the difference is negative.
Is there a way to limit the "Score" to 0 and restrict it from going to negatives?
Any help would be much appreciated.
Akzeptierte Antwort
Alan Weiss
am 25 Nov. 2021
Instead of minimizing TARGETVALUE - ACTUALVALUE , instead minimize either abs(TARGETVALUE - ACTUALVALUE) or (TARGETVALUE - ACTUALVALUE)^2.
Alan Weiss
MATLAB mathematical toolbox documentation
0 Kommentare
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!