ga function Input data
Mostra commenti meno recenti
Hey, I wish to use ga optimization for a given function.
I want to send an "extra" variable to the function that is not part of the optimized variables
basically: I have a function
function f=FindAC(x,val)
X is a 2X1 vector that I want to find the optimized value val is just a long array of input data
I tried:
ga(@(x,val)FindAC,2,[],[],[],[],lb,ub,[],intcon)
but I get error message
Not enough input arguments.
needless to say that without the ga optimization :
f=FindAC(x,val)
the function runs without errors
how can I send "val" to the function while asking the ga to optimize x
1 Commento
Stephen23
il 6 Lug 2018
How to do this is explained in the MATLAB documentation:
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Problem-Based Optimization Setup in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!