fminicon optimization function and NaN problem
Mostra commenti meno recenti
fminicon optimization and NaN problem ,
I have a function that i am trying to minimize it using the fminicon optimization function and the results return are always NaN, i have debugged the program and checked the reason of the NaN it was because i have some results in the function equal to zero then in the function this results should take log and it will give -inf the when multiplied by zero it will give NaN,
my question is that can i do anything to make the fminicon function overcome the problem of the NaN?
i would really appreciate your help
thanks in advance
Risposte (1)
Alan Weiss
il 28 Ago 2017
0 voti
If you give a starting point that is feasible (no NaN values), and use the interior-point algorithm, then fmincon should be able to handle the issue.
You could also write your objective function to explicitly look for the issue and return proper values.
Alan Weiss
MATLAB mathematical toolbox documentation
1 Commento
sal
il 28 Ago 2017
Categorie
Scopri di più su Entering Commands in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!