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: 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: 18,038
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" <> wrote in message
> 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?

"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
To contact Technical Support use the Contact Us link on

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.