ABSTRACT

Solving the function f (x) = 0 for the special case when f is a polynomial and x is a scalar is discussed in Section 20.1. The more general case is discussed in the next section.

The fzero function finds a numerical solution to f (x) = 0 when f is a real function over the real domain (both x and f (x) must be real scalars). This is useful when an analytic solution is not possible. You must supply either an initial guess, or two values of x for which the function differs in sign. Here is a simple example that computes

√ 2.