Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

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

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" <slord@mathworks.com> wrote in message <ks3hv5$sm8$1@newscl01ah.mathworks.com>...
>
>
> "Muhammad " <mahmadriaz@gmail.com> wrote in message
> news:ks2bvr$6p7$1@newscl01ah.mathworks.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().

>
> 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
> slord@mathworks.com
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com

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]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.