which is more accurate/good/feasible 'optimtool' or a same function involked in command window?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi
I am optimizing a non linear function using 'fmincon'. when i am using this command in matlab command window i am getting some results which is different than when i am using it with 'optimtool' user interface for optimization. Both the cases have same input data but output is different for some variables.
P.S. My objective function calls many user defined functions while calculation. Is it the reason??
0 comentarios
Respuesta aceptada
Shashank Prasanna
el 25 de Mzo. de 2013
You should get the exact same result if you call it in command line or through the GUI, they use the same functions. There could be couple of reasons you may be seeing different results, some may be:
1) The options are different. You can change the options in the command line using OPTIMSET. In the GUI you can just enter them. The options holds several tolerances and that will affect your stopping criterion.
2) Do you have something that is random in your objective function or initial conditions? If yes you can fix the seed of the internal random number generator using the RNG function.
3) Check if the constraints are the same.
Más respuestas (0)
Ver también
Categorías
Más información sobre Problem-Based Optimization Setup en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!