<< dwindow Other gaussn >>

stftb >> stftb > Other > fzero

fzero

solves the scalar nonlinear equation such that F(X) == 0

Calling Sequence

[X, FX, INFO] = fzero (FCN, APPROX, OPTIONS)

Parameters

FCN :

function name as string

OPTIONS is a structure, with the following fields:

Description

Given Func, the name of a function of the form `F (X)', and an initial approximation APPROX, `fzero' solves the scalar nonlinear equation such that `F(X) == 0'. Depending on APPROX, `fzero' uses different algorithms to solve the problem: either the Brent's method or the Powell's method of `fsolve'. The computed approximation to the zero of FCN is returned in X. FX is then equal to FCN(X). If the iteration converged, INFO == 1. If Brent's method is used, and the function seems discontinuous, INFO is set to -5. If fsolve is used, INFO is determined by its convergence.

Examples

fzero('sin',[-2 1])
[x, fx, info] = fzero('sin',-2)
options.abstol = 1e-2; fzero('sin',-2, options)

Authors


Report an issue
<< dwindow Other gaussn >>