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: Avoid a certain solution w fzero
Replies: 4   Last Post: Feb 21, 2013 10:12 AM

Advanced Search

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

Posts: 17,944
Registered: 12/7/04
Re: Avoid a certain solution w fzero
Posted: Feb 21, 2013 10:12 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply



"Matt beach" <all.guitars.for.me@gmail.com> wrote in message
news:kg3ash$mc6$1@newscl01ah.mathworks.com...
> Hi,
> Is there a way to have fzero avoid certain roots?
> i.e. my polynomial always has 0 as a root, but I don't want it to find
> zero everytime!
> I know Maple has the avoid=[t=0] command, not sure if matlab has a similar
> one?


http://www.mathworks.com/help/matlab/ref/fzero.html

"If x0 is a vector of length two, fzero assumes x0 is an interval where the
sign of fun(x0(1)) differs from the sign of fun(x0(2)). An error occurs if
this is not true. Calling fzero with such an interval guarantees fzero will
return a value near a point where fun changes sign."

So specify an interval that doesn't include 0 where the sign of your
function is different at each endpoint.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com




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.