how to find the value fmincon is trying
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi fellows,
I am using fmincon to find the minimum of function f. Sometimes it gets a value of f is NaN , so fmincon fails to converge. Do you know how to find what value that fmincon is trying when it gets f as NaN?
0 Kommentare
Antworten (1)
Walter Roberson
am 26 Nov. 2013
At the command prompt give the command
dbstop if infnan
and run. When it stops you can examine the parameters passed in to your function.
2 Kommentare
Walter Roberson
am 26 Nov. 2013
Look at
whos
and look at the parameter names you gave when you wrote the function and ask to look at those parameters. "x" is pretty common for this purpose.
Siehe auch
Kategorien
Mehr zu Nonlinear Optimization 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!