How to avoid going through unnecessary functions when tracing fmincon in Matlab to findout it call the right objective and constriant functions.

1 次查看(过去 30 天)
I want to trace fmincon function in Matlab to get sure it reads the objective function and constraints function from the right files. The problem is when I step in the fmincon function, it goes to other functions that are unnecessary for my tracing aim. I was wonder to ask, does anyone know which lines should I neglect in tracing to only find the part that How to avoid unnecessary functions for tracing of fmincon Matlab call my objective function and constraints function.

采纳的回答

Brendan Hamm
Brendan Hamm 2015-3-18
Sorry no one got to this one yet. The which command will tell you the location of the file which MATLAB finds first on its search path. If you objective is in a file myObjective.m, then:
which myObjective
will return to you the path of the file MATLAB would use for your objective in your call to fmincon. You can also return all of the files MATLAB finds on its path with the optional flag:
which myObjective -all
If you wish to view your MATLAB path their is an icon under the Environment Section of the Toolbar on your Home Tab. Just note that files in your current folder will always be found ahead of those in the search path.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by