The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: MATLAB R2011a code for LineSearch
Replies: 3   Last Post: Jul 16, 2013 5:14 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 5
Registered: 7/15/13
Re: MATLAB R2011a code for LineSearch
Posted: Jul 16, 2013 5:14 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Steven_Lord" <> wrote in message <ks3hv5$sm8$>...
> "Muhammad " <> wrote in message
> news:ks2bvr$6p7$

> > 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

> > 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().

> You can't.
> What you _could_ do is wrap your FMINUNC call in a TRY/CATCH block and
> handle the exception in the CATCH section somehow.
> --
> Steve Lord
> To contact Technical Support use the Contact Us link on

Thanks a lot. That try catch thing solved my problem :)

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.