"Muhammad " <firstname.lastname@example.org> wrote in message news:email@example.com... > I need to see the code of matlab built in function named lineSearch. I > know for sure it was accessible in 2011 version but has been hidden (into > a .p file which is probably compiled as i only see strange characters in > it).
We don't generally distribute the source code for functions that have been PCODEd.
> I need this file because i am running an experiment, in which this > function is called a few thousand times from fminunc(). Rarely this > function fails with the error that search direction does not reduce the > function value and after raising an exception the execution stops. So i > edited the code to not raise an exception but return the exitflag as -2. I > mean what the exit flag is for if exceptions are being raised? I cannot > afford a halt of execution. Please help. I want to copy paste that code, > into a linesearch_editted().
What you _could_ do is wrap your FMINUNC call in a TRY/CATCH block and handle the exception in the CATCH section somehow.