Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
|
|
Re: Avoid a certain solution w fzero
Posted:
Feb 21, 2013 10:12 AM
|
|
"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
|
|
|
|